Bug 69923

Summary: [v8] Use V8DOMWrapper::isWrapperOfType for determining global object type
Product: WebKit Reporter: Yury Semikhatsky <yurys>
Component: WebCore Misc.Assignee: Yury Semikhatsky <yurys>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, antonm, pfeldman, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch pfeldman: review+

Description Yury Semikhatsky 2011-10-12 06:14:49 PDT
globalObjectPrototypeIsDOMWindow now relies on the difference in internal fields count between DOMWindow and WorkerContext. Would be better to use V8DOMWrapper::isWrapperOfType for determining the global object type.
Comment 1 Yury Semikhatsky 2011-10-12 06:21:31 PDT
Created attachment 110677 [details]
Patch
Comment 2 anton muhin 2011-10-12 06:25:51 PDT
Comment on attachment 110677 [details]
Patch

lgtm, the only concern if it regresses performance as instantiateV8Object may be hot on some benchmarks.  Mind running against Dromaeo with and without this change just to be sure?
Comment 3 Yury Semikhatsky 2011-10-12 07:18:16 PDT
(In reply to comment #2)
> (From update of attachment 110677 [details])
> lgtm, the only concern if it regresses performance as instantiateV8Object may be hot on some benchmarks.  Mind running against Dromaeo with and without this change just to be sure?

Without the patch: http://dromaeo.com/?id=152544 -- 1147.88runs/s (Total)
With the patch applied:  http://dromaeo.com/?id=152545 -- 1130.44runs/s (Total)
Comment 4 Yury Semikhatsky 2011-10-12 07:21:52 PDT
Committed r97260: <http://trac.webkit.org/changeset/97260>