Bug 33201

Summary: [V8] Move createWindow into generic bindings so it can be shared with JSC
Product: WebKit Reporter: Adam Barth <abarth>
Component: WebCore JavaScriptAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: creis, dglazkov, mjs, sam, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Patch none

Description Adam Barth 2010-01-05 01:12:27 PST
[V8] Move createWindow into generic bindings so it can be shared with JSC
Comment 1 Adam Barth 2010-01-05 01:16:32 PST
Created attachment 45872 [details]
Patch
Comment 2 WebKit Review Bot 2010-01-05 01:17:24 PST
style-queue ran check-webkit-style on attachment 45872 [details] without any errors.
Comment 3 Dimitri Glazkov (Google) 2010-01-05 09:07:49 PST
Comment on attachment 45872 [details]
Patch

ok. I am learning about this generic binding from this patch -- it looks pretty interesting. I am assuming this is very much in flux still, so I'll follow along.

I am assuming State<Binding> -> ScriptState? Or is this going to be a more generic concept?
Comment 4 Adam Barth 2010-01-05 10:27:12 PST
> I am assuming State<Binding> -> ScriptState? Or is this going to be a more
> generic concept?

The Script* types are WebCore's view of the bindings.  The templated objects are the generic bindings view of the engine-specific bindings.  I want to see how far I can push things, but eventually we might hope that the templated objects are a relatively thin layer around the JavaScript engine itself.

To specifically answer your question, State<Binding> is ExecState for JSC and nothing for V8 (because V8 uses statics instead of a state object).

Another way to think about this is to look at ScriptValue and Bindings::Value.  ScriptValue uses a persistent handle with a managed lifetime, which is how WebCore wants to think about the bindings, but that's slow and memory intensive.  Bindings::Value is just a regular value handle, which means zero overhead.
Comment 5 Adam Barth 2010-01-05 11:03:39 PST
Comment on attachment 45872 [details]
Patch

Clearing flags on attachment: 45872

Committed r52810: <http://trac.webkit.org/changeset/52810>
Comment 6 Adam Barth 2010-01-05 11:03:47 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Dominic Cooney 2010-08-08 23:33:48 PDT
Created attachment 63860 [details]
Patch
Comment 8 Dominic Cooney 2010-08-08 23:35:09 PDT
Comment on attachment 63860 [details]
Patch

Commit message confused webkit-patch.