Closed
Bug 558211
Opened 16 years ago
Closed 16 years ago
Eliminate JS_SetObjectHook
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: jorendorff, Assigned: jorendorff)
Details
Attachments
(3 files)
|
38.84 KB,
patch
|
Details | Diff | Splinter Review | |
|
12.34 KB,
patch
|
Details | Diff | Splinter Review | |
|
6.92 KB,
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
I'm not sure we have any debuggers actually using this. It's a little hard to tell, because JSD enables the object hook by default, but disables it if the client asks for JSD_DISABLE_OBJECT_TRACE, aka jsdIDebuggerService.DISABLE_OBJECT_TRACE.
ISTR Firebug uses that flag.
Comment 1•16 years ago
|
||
Also worth checking what venkman does.
| Assignee | ||
Comment 2•16 years ago
|
||
Firebug: http://www.google.com/codesearch/p?hl=en#FXMmmf0ln7k/components/firebug-service.js&q=DISABLE_OBJECT_TRACE%20package:http://fbug\.googlecode\.com&sa=N&cd=1&ct=rc&l=700
Venkman: http://mxr.mozilla.org/mozilla/source/extensions/venkman/resources/content/venkman-debugger.js#132
I don't think it's used.
| Assignee | ||
Comment 3•16 years ago
|
||
(note: I put all the IDL changes in part 2, coming soon)
Assignee: general → jorendorff
Attachment #438880 -
Flags: review?
| Assignee | ||
Comment 4•16 years ago
|
||
Attachment #438881 -
Flags: review?(timeless)
| Assignee | ||
Comment 5•16 years ago
|
||
Attachment #438882 -
Flags: review?(gal)
| Assignee | ||
Updated•16 years ago
|
Summary: Investigate eliminating JS_SetObjectHook → Eliminate JS_SetObjectHook
Updated•16 years ago
|
Attachment #438882 -
Flags: review?(gal) → review+
Comment 6•16 years ago
|
||
Comment on attachment 438882 [details] [diff] [review]
part 3, remove JS_SetObjectHook from the js engine - v1
Good bye new object hook. You won't be missed around here.
| Assignee | ||
Comment 7•16 years ago
|
||
It looks like Venkman is using JS_SetObjectHook. This function is getting metadata about an object that's gathered via the hook:
http://mxr.mozilla.org/mozilla/source/extensions/venkman/resources/content/venkman-commands.js#918
You can look at an object and see where it was allocated -- useful stuff. Off by default though.
There's no measurable performance improvement (on V8 or SunSpider) deleting the object hook, I think because neither JIT code nor anything called from JIT code even tests to see that the hook is set (it is guaranteed not to be set if we're on trace). It might be harmless to just leave it.
| Assignee | ||
Updated•16 years ago
|
Attachment #438880 -
Flags: review?
| Assignee | ||
Updated•16 years ago
|
Attachment #438881 -
Flags: review?(timeless)
| Assignee | ||
Updated•16 years ago
|
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•