Closed
Bug 1276309
Opened 9 years ago
Closed 9 years ago
Stop relying on the precise value of nsIScriptContext::GetNativeContext
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(2 files, 1 obsolete file)
1.32 KB,
patch
|
bkelly
:
review+
|
Details | Diff | Splinter Review |
1.90 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
We obviously need this to move to one JSContext per runtime.
Current places that do this are:
1) nsGlobalWindow::FinalClose. I think we can switch this to GetEntryGlobal.
2) nsScriptLoader::EvaluateScript in the module case. This should be using aes.cx().
I think that's it.
![]() |
Assignee | |
Comment 1•9 years ago
|
||
Attachment #8757415 -
Flags: review?(bkelly)
![]() |
Assignee | |
Updated•9 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
![]() |
Assignee | |
Comment 2•9 years ago
|
||
Attachment #8757419 -
Flags: review?(bugs)
![]() |
Assignee | |
Comment 3•9 years ago
|
||
Attachment #8757421 -
Flags: review?(bugs)
![]() |
Assignee | |
Updated•9 years ago
|
Attachment #8757419 -
Attachment is obsolete: true
Attachment #8757419 -
Flags: review?(bugs)
Comment 4•9 years ago
|
||
Comment on attachment 8757415 [details] [diff] [review]
part 1. Stop depending on the exact value of nsIScriptContext::GetNativeContext in the scriptloader
Review of attachment 8757415 [details] [diff] [review]:
-----------------------------------------------------------------
Since aes is initialized with the same context, this should be equivalent AFAICT.
Attachment #8757415 -
Flags: review?(bkelly) → review+
Comment 5•9 years ago
|
||
Comment on attachment 8757421 [details] [diff] [review]
part 2. Stop depending on the exact value of nsIScriptContext::GetNativeContext in nsGlobalWindow::FinalClose
Doesn't the fix rely on us using AutoJSAPI vs AutoEntryScript correctly, since
AutoJSAPI ends up pushing stuff to stack, but only AutoEntryScript updates the entryglobal? AutoJSAPI vs. AutoEntryScript usage has been a bit ad hoc, but hopefully it is better these days.
So, better to push to try and see how this behaves.
Attachment #8757421 -
Flags: review?(bugs) → review+
![]() |
Assignee | |
Comment 6•9 years ago
|
||
> Doesn't the fix rely on us using AutoJSAPI vs AutoEntryScript correctly
Yes, it does. I did push this to try as part of https://treeherder.mozilla.org/#/jobs?repo=try&revision=ed3d2c0aa0df and it's looking pretty good.
Comment 8•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/eb35c54faae8
https://hg.mozilla.org/mozilla-central/rev/6210926fe4f3
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•