RESOLVED FIXED 34658
[V8] Use toV8() for wrapping objects in a WorkerContext
https://bugs.webkit.org/show_bug.cgi?id=34658
Summary [V8] Use toV8() for wrapping objects in a WorkerContext
Nate Chapin
Reported 2010-02-05 13:09:50 PST
The main thing this requires is checking for the existence of a WorkerContextExecutionProxy in V8DOMWrapper::instantiateV8Object() prior to checking for a V8Proxy, since calling V8Proxy::retrieve() in a WorkerContext will crash us.
Attachments
patch (19.52 KB, patch)
2010-02-05 13:42 PST, Nate Chapin
dglazkov: review+
Nate Chapin
Comment 1 2010-02-05 13:42:41 PST
Created attachment 48254 [details] patch Perf tests are still running, but I think this change is ok.
Dimitri Glazkov (Google)
Comment 2 2010-02-06 09:45:17 PST
Comment on attachment 48254 [details] patch This looks great! Except: > + // Get the WorkerContextExecutionProxy first. If we are in a WorkerContext and we try to call V8Proxy::retrieve(), > + // we crash trying to retrieve a DOMWindow. > + WorkerContextExecutionProxy* workerContextProxy = WorkerContextExecutionProxy::retrieve(); Are you sure this doesn't affect performance?
Nate Chapin
Comment 3 2010-02-08 09:23:09 PST
(In reply to comment #2) > (From update of attachment 48254 [details]) > This looks great! Except: > > > + // Get the WorkerContextExecutionProxy first. If we are in a WorkerContext and we try to call V8Proxy::retrieve(), > > + // we crash trying to retrieve a DOMWindow. > > + WorkerContextExecutionProxy* workerContextProxy = WorkerContextExecutionProxy::retrieve(); > > Are you sure this doesn't affect performance? I ran the dromaeo tests locally and the results were comparable with and without the change. If there's anything else you'd like me to run, please let me know :)
Dimitri Glazkov (Google)
Comment 4 2010-02-08 09:45:16 PST
Comment on attachment 48254 [details] patch ok. I trust you'll monitor the perf bots.
Nate Chapin
Comment 5 2010-02-08 11:47:09 PST
Note You need to log in before you can comment on or make changes to this bug.