Closed
Bug 1276286
Opened 10 years ago
Closed 10 years ago
Remove the unused JSContext goop in nsJSObjWrapper::GetNewOrUsed
Categories
(Core Graveyard :: Plug-ins, defect)
Core Graveyard
Plug-ins
Tracking
(firefox49 fixed)
RESOLVED
FIXED
mozilla49
| Tracking | Status | |
|---|---|---|
| firefox49 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
Attachments
(1 file)
|
5.40 KB,
patch
|
mccr8
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8757390 -
Flags: review?(continuation)
Comment 2•10 years ago
|
||
Comment on attachment 8757390 [details] [diff] [review]
Remove the unused JSContext stuff in nsJSObjWrapper::GetNewOrUsed
Review of attachment 8757390 [details] [diff] [review]:
-----------------------------------------------------------------
For the record, bug 1239494 removed the last usage of cx in GetNewOrUsed.
::: dom/plugins/base/nsJSNPRuntime.cpp
@@ +597,5 @@
> if (!obj) {
> obj = val.toObjectOrNull();
> }
>
> + NPObject *npobj = nsJSObjWrapper::GetNewOrUsed(npp, obj);
Maybe move the * over while you are touching this line.
::: dom/plugins/base/nsJSNPRuntime.h
@@ +57,5 @@
> JS::Heap<JSObject *> mJSObj;
> const NPP mNpp;
> bool mDestroyPending;
>
> + static NPObject *GetNewOrUsed(NPP npp, JS::Handle<JSObject*> obj);
nit: extra space before JS::Handle. Also, maybe move the * over to NPObject while you are here.
::: dom/plugins/base/nsNPAPIPlugin.cpp
@@ +1061,5 @@
> NS_ENSURE_TRUE(doc, nullptr);
> nsCOMPtr<nsPIDOMWindowOuter> outer = doc->GetWindow();
> NS_ENSURE_TRUE(outer, nullptr);
>
> + JS::Rooted<JSObject*> global(nsContentUtils::RootingCx(),
I guess eventually Rooted won't take a cx arg, eliminating this ugliness...
Attachment #8757390 -
Flags: review?(continuation) → review+
Comment 4•10 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Updated•4 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•