Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Issue 1210083004: bindings: Supports reentrance to ScriptWrappable::wrap through V8DOMWrapper::createWrapper. (Closed)

Created:
5 years, 5 months ago by Yuki
Modified:
5 years, 5 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, arv+blink, vivekg_samsung, sof, eae+blinkwatch, vivekg, dglazkov+blink, blink-reviews-bindings_chromium.org, rwlbuis
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

bindings: Supports reentrance to ScriptWrappable::wrap through V8DOMWrapper::createWrapper. Considering V8DOMWrapper::createWrapper invokes v8::FunctionTemplate::GetFunction and v8::Function::NewInstance, it may run an arbitrary script and reenter to ScriptWrappable::wrap with the same object. This CL supports such a case and consistently uses the wrapper that is created and associated first. BUG=477425, 389445 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197984

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -0 lines) Patch
M Source/bindings/core/v8/ScriptWrappable.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/dom/DOMArrayBuffer.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/dom/DOMDataView.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/dom/DOMTypedArray.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/dom/Node.cpp View 1 chunk +6 lines, -0 lines 2 comments Download

Messages

Total messages: 10 (3 generated)
Yuki
Could you review this CL?
5 years, 5 months ago (2015-06-29 10:51:35 UTC) #2
haraken
LGTM I hope this won't regress performance :) https://codereview.chromium.org/1210083004/diff/1/Source/core/dom/Node.cpp File Source/core/dom/Node.cpp (right): https://codereview.chromium.org/1210083004/diff/1/Source/core/dom/Node.cpp#newcode2416 Source/core/dom/Node.cpp:2416: v8::Local<v8::Object> ...
5 years, 5 months ago (2015-06-29 12:00:31 UTC) #4
Yuki
https://codereview.chromium.org/1210083004/diff/1/Source/core/dom/Node.cpp File Source/core/dom/Node.cpp (right): https://codereview.chromium.org/1210083004/diff/1/Source/core/dom/Node.cpp#newcode2416 Source/core/dom/Node.cpp:2416: v8::Local<v8::Object> Node::wrap(v8::Isolate* isolate, v8::Local<v8::Object> creationContext) On 2015/06/29 12:00:30, haraken ...
5 years, 5 months ago (2015-06-29 12:42:41 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1210083004/1
5 years, 5 months ago (2015-06-29 12:43:21 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://src.chromium.org/viewvc/blink?view=rev&revision=197984
5 years, 5 months ago (2015-06-29 12:46:10 UTC) #8
haraken
Forgot to say... can we add a test for this in a follow-up?
5 years, 5 months ago (2015-06-29 13:53:59 UTC) #9
Yuki
5 years, 5 months ago (2015-07-01 07:20:38 UTC) #10
Message was sent while issue was closed.
On 2015/06/29 13:53:59, haraken wrote:
> Forgot to say... can we add a test for this in a follow-up?

I tried valueOf, but it didn't work.  When running f = new Foo(), Foo.valueOf
wasn't called.  It seems not easy to repro the case.

Powered by Google App Engine
This is Rietveld 408576698