RESOLVED FIXED 93315
[V8] Pass Isolate to ArrayValue and Dictionary
https://bugs.webkit.org/show_bug.cgi?id=93315
Summary [V8] Pass Isolate to ArrayValue and Dictionary
Kentaro Hara
Reported 2012-08-06 18:15:06 PDT
We should pass Isolate to ArrayValue and Dictionary. Rationale 1: We want to replace V8Proxy::throwError(ExceptionCode) with setDOMException(ExceptionCode, Isolate*). For the replacement, we need to pass Isolate to V8Utilities::extractTransferables(). To pass Isolate to V8Utilities::extractTransferables(), ( ...omitted... ), we need to pass Isolate* to ArrayValue and Dictionary. Rationale 2: JSC already passes ExecState to ArrayValue and Dictionary.
Attachments
Patch (10.76 KB, patch)
2012-08-06 18:17 PDT, Kentaro Hara
no flags
Patch (10.77 KB, patch)
2012-08-06 18:53 PDT, Kentaro Hara
no flags
patch for landing (11.05 KB, patch)
2012-08-07 18:32 PDT, Kentaro Hara
no flags
Patch (11.05 KB, patch)
2012-08-07 18:33 PDT, Kentaro Hara
no flags
Kentaro Hara
Comment 1 2012-08-06 18:17:55 PDT
WebKit Review Bot
Comment 2 2012-08-06 18:33:44 PDT
Comment on attachment 156818 [details] Patch Attachment 156818 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13451204
Kentaro Hara
Comment 3 2012-08-06 18:53:02 PDT
Adam Barth
Comment 4 2012-08-07 15:01:32 PDT
Comment on attachment 156825 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=156825&action=review > Source/WebCore/bindings/v8/ArrayValue.h:60 > + v8::Isolate* m_isolate; Is it ok to store a long-lived pointer to an isolate? How do we know this pointer remains valid?
Kentaro Hara
Comment 5 2012-08-07 18:32:00 PDT
Created attachment 157078 [details] patch for landing
Kentaro Hara
Comment 6 2012-08-07 18:33:02 PDT
Kentaro Hara
Comment 7 2012-08-07 18:38:34 PDT
(In reply to comment #4) > > Source/WebCore/bindings/v8/ArrayValue.h:60 > > + v8::Isolate* m_isolate; > > Is it ok to store a long-lived pointer to an isolate? How do we know this pointer remains valid? I think it's ok. Dictionary and ArrayValue are designed based on the assumption that they are allocated on stack. In fact, - Dictionary already has m_options of type Local<Value>. ArrayValue already has m_array of type Local<Array>. - JSC already stores ExecState in Dictionary and ArrayValue. Just in case, I added ASSERT(m_isolate == v8::Isolate::Current()) to the patch.
Adam Barth
Comment 8 2012-08-07 22:32:22 PDT
Comment on attachment 157079 [details] Patch Makes sense. Thanks.
WebKit Review Bot
Comment 9 2012-08-08 00:06:39 PDT
Comment on attachment 157079 [details] Patch Rejecting attachment 157079 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: -merging Tools/ChangeLog Failed to merge in the changes. Patch failed at 0001 Optimize ChildNode{Insertion,Removal}Notifier::notify() by lazily taking a snapshot of child nodes When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To restore the original branch and stop rebasing run "git rebase --abort". rebase refs/remotes/origin/master: command returned error: 1 Died at Tools/Scripts/update-webkit line 164. Full output: http://queues.webkit.org/results/13459119
WebKit Review Bot
Comment 10 2012-08-08 02:45:39 PDT
Comment on attachment 157079 [details] Patch Clearing flags on attachment: 157079 Committed r125012: <http://trac.webkit.org/changeset/125012>
WebKit Review Bot
Comment 11 2012-08-08 02:45:43 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.