Closed
Bug 1370614
Opened 7 years ago
Closed 7 years ago
Replace some uses of ProtoAndIfaceCache::EntrySlotIfExists with something that returns a boolean
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
Right now we return a JSObject*, which means we end up barriering on it and doing exposeToJS. There's no need to do that; all the consumers just want to know whether it's null. So we could return a boolean, which Heap<JSObject*> can produce without barriering.
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8874953 -
Flags: review?(nfroyd)
Assignee | ||
Updated•7 years ago
|
Summary: Replace ProtoAndIfaceCache::EntrySlotIfExists with something that returns a boolean → Replace some uses of ProtoAndIfaceCache::EntrySlotIfExists with something that returns a boolean
Comment 2•7 years ago
|
||
Comment on attachment 8874953 [details] [diff] [review] Replace some uses of ProtoAndIfaceCache::EntrySlotIfExists with a faster boolean-returning test function Review of attachment 8874953 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bindings/BindingUtils.h @@ +319,5 @@ > } > return (*p)[leafIndex]; > } > > + bool HasEntryInSlot(size_t i) { Would be nice if there was a way to write this function without so much duplication, but... :(
Attachment #8874953 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 3•7 years ago
|
||
Yeah, I couldn't figure out a way to do that, without doing manual exposing stuff or something. I thought I could nix EntrySlotIfExists completely, but we do have one single consumer of it that actually wants the JSObject*. That said, maybe I can just switch ResolvePrototypeOrConstructor to EntrySlotMustExist. I believe in all cases when it's used this is in fact true... and the current behavior when null is returned is a bit bonkers anyway (uncatchable exception). Filed bug 1370640.
Blocks: 1370640
Pushed by bzbarsky@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/b84707ac2dfe Replace some uses of ProtoAndIfaceCache::EntrySlotIfExists with a faster boolean-returning test function. r=froydnj
Comment 5•7 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b84707ac2dfe
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•