Closed
Bug 570662
Opened 15 years ago
Closed 14 years ago
TM: eagerly call thisObject hook and cache result in global objects
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: gal, Assigned: jorendorff)
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file, 2 obsolete files)
3.17 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
This patch does less than we could do, but I ran into a few complications. Also, its not entirely clear this is safe. If this works, we can rip out JSFRAME_CALCULATED_THIS and remove fp->thisv, but that patch is pretty involved, so lets do this one by one.
Reporter | ||
Comment 1•15 years ago
|
||
Assignee: general → gal
Reporter | ||
Comment 2•15 years ago
|
||
Things that worry me: thisObject hook runs when the global object is made, not when accessing .this, so stack and scope chain might look different. Also, invalidation? Or is this always safe? With our cross compartment wrappers this should be safe for sure. Right now not so sure.
Reporter | ||
Updated•15 years ago
|
Attachment #449804 -
Flags: review?(mrbkap)
Reporter | ||
Comment 3•15 years ago
|
||
Note the code around this comment: /* Now that the frame has been pushed, we can call the thisObject hook. */ Thats basically exactly what worries me.
Assignee | ||
Comment 4•14 years ago
|
||
Blake noticed that if you call thisObject from JS_SetGlobalObject, it will call JS_GetScopeChain and get back a wrong answer (likely NULL). So we wait until the first time you need it.
Assignee: gal → jorendorff
Attachment #449804 -
Attachment is obsolete: true
Attachment #454088 -
Flags: review?(mrbkap)
Attachment #449804 -
Flags: review?(mrbkap)
Assignee | ||
Comment 5•14 years ago
|
||
Attachment #454088 -
Attachment is obsolete: true
Attachment #454096 -
Flags: review?(mrbkap)
Attachment #454088 -
Flags: review?(mrbkap)
Assignee | ||
Comment 6•14 years ago
|
||
Comment on attachment 454096 [details] [diff] [review] v2 mrbkap says it's ok
Attachment #454096 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 7•14 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/9ae06b151fdf
Assignee | ||
Updated•14 years ago
|
Whiteboard: fixed-in-tracemonkey
Assignee | ||
Comment 8•14 years ago
|
||
Also requires this follow-up fix: http://hg.mozilla.org/tracemonkey/rev/f454bf6a0693
Comment 9•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/9ae06b151fdf http://hg.mozilla.org/mozilla-central/rev/f454bf6a0693
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•