[webkit-reviews] review requested: [Bug 27420] Refactor WorkerContext to move DedicatedWorker-specific APIs into DedicatedWorkerContext : [Attachment 33397] Patch addressing dimich's comments

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 23 17:57:54 PDT 2009


Andrew Wilson <atwilson at google.com> has asked  for review:
Bug 27420: Refactor WorkerContext to move DedicatedWorker-specific APIs into
DedicatedWorkerContext
https://bugs.webkit.org/show_bug.cgi?id=27420

Attachment 33397: Patch addressing dimich's comments
https://bugs.webkit.org/attachment.cgi?id=33397&action=review

------- Additional Comments from Andrew Wilson <atwilson at google.com>
I fixed up a number of places where we were doing the wrong thing in the V8
bindings.

Note that V8ClassIndex::WORKERCONTEXT can't go away entirely, as it's still
used by the generated code in V8WorkerContext.cpp, and also used for generating
the template chain for derived classes like V8DedicatedWorkerContext.

Also, it is OK to do lookupDOMWrapper(V8ClassIndex::WORKERCONTEXT, global) in
WorkerContextExecutionProxy::retrieve(), because lookupDOMWrapper walks up the
prototype chain to determine the class. Likewise for calling
convertToNativeObject(WORKERCONTEXT, global) - it still works no matter what
type you pass in, derived or base. In fact, convertToNativeObject() mostly just
uses the passed-in type for error checking, as it always ends up pulling a
pointer to the impl object out of the same place in the wrapper regardless of
type anyway.


More information about the webkit-reviews mailing list