Summary: | Devirtualize getOwnPropertySlot() | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Cameron Zwarich (cpst) <zwarich> | ||||||
Component: | JavaScriptCore | Assignee: | Darin Adler <darin> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | darin | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 20813 | ||||||||
Attachments: |
|
Description
Cameron Zwarich (cpst)
2008-10-01 23:01:21 PDT
Sam is now working on other tasks, so I will assign this to myself. *** Bug 21793 has been marked as a duplicate of this bug. *** Created attachment 24559 [details]
patch, working but ChangeLog not done yet
Created attachment 24561 [details]
patch
Comment on attachment 24561 [details]
patch
- // WebCore uses this to make document.all and style.filter undetectable.
static const unsigned MasqueradesAsUndefined = 1;
+ // WebCore uses MasqueradesAsUndefined to make document.all and style.filter undetectable.
static const unsigned ImplementsHasInstance = 1 << 1;
The whitespace for this comment seems wrong.
+JSGlueGlobalObject::JSGlueGlobalObject(PassRefPtr<StructureID> structure, JSFlags flags)
+ : JSGlobalObject(structure, new Data, this)
+{
+ d()->flags = flags;
+ d()->userObjectStructure = UserObjectImp::createStructureID(jsNull());
+}
Might be cleaner to make the Data constructor take arguments.
+ if (prototype->isNull()) {
+ static StructureID* structureID = JSInspectorCallbackWrapper::createStructureID(jsNull()).releaseRef();
+ return new (unwrappedExec) JSInspectorCallbackWrapper(unwrappedExec, unwrappedObject, structureID);
+ }
Why is leaking the StructureID okay here?
For QtRuntimeMethod::createStructureID, why does it have the ImplementsHasInstance flag like InternalFunction?
r=me.
(In reply to comment #5) > (From update of attachment 24561 [details] [edit]) > - // WebCore uses this to make document.all and style.filter undetectable. > static const unsigned MasqueradesAsUndefined = 1; > + // WebCore uses MasqueradesAsUndefined to make document.all and > style.filter undetectable. > static const unsigned ImplementsHasInstance = 1 << 1; > The whitespace for this comment seems wrong. I'll move the comment back. > + d()->flags = flags; > > Might be cleaner to make the Data constructor take arguments. Sure, but since this is just JavaScriptGlue, I think I'll leave it as-is. > + if (prototype->isNull()) { > + static StructureID* structureID = > JSInspectorCallbackWrapper::createStructureID(jsNull()).releaseRef(); > + return new (unwrappedExec) JSInspectorCallbackWrapper(unwrappedExec, > unwrappedObject, structureID); > + } > > Why is leaking the StructureID okay here? As we discussed, I'll use StructureID::startIgnoringLeaks(). > For QtRuntimeMethod::createStructureID, why does it have the > ImplementsHasInstance flag like InternalFunction? Oops, will fix. |