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

Issue 1100693002: bindings: Do not use ScriptWrappable::wrap for RemoteDOMWindow. (Closed)

Created:
5 years, 8 months ago by Yuki
Modified:
5 years, 8 months ago
Reviewers:
haraken, dcheng
CC:
arv+blink, blink-reviews, blink-reviews-bindings_chromium.org, vivekg_samsung, vivekg
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

bindings: Do not use ScriptWrappable::wrap for RemoteDOMWindow. Custom toV8(EventTarget*) has been handling LocalDOMWindow in a special manner so that custom toV8(DOMWindow*) is always used. However, when RemoteDOMWindow, and DOMWindow as their superclass, were introduced, we didn't add the same support for RemoteDOMWindow nor DOMWindow. It was wrong. When toV8(EventTarget*) is called with a RemoteDOMWindow before installDOMWindow is called, toV8(EventTarget*) calls RemoteDOMWindow::wrap() and it creates a wrapper. After that, when installDOMWindow is called, the wrapper already exists for the RemoteDOMWindow and it causes crash. I think this is the cause of mysterious crashes around installDOMWindow. This CL fixes: - Makes sure that DOMWindow::wrap is never called. - Calls toV8(DOMWindow*) for not only LocalDOMWindow but also RemoteDOMWindow. I've confirmed that crash occurs at www.nhl.com with --site-per-process specified, and fix with this CL. BUG=478890, 477410, 475880 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=194193

Patch Set 1 #

Patch Set 2 : Fixed compile error with MSVC. #

Patch Set 3 : Synced. #

Patch Set 4 : Fixed ActivityLoggerTest. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -16 lines) Patch
M Source/bindings/core/v8/custom/V8EventTargetCustom.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/build/scripts/templates/MakeNames.h.tmpl View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/events/EventTargetFactory.in View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/frame/DOMWindow.h View 1 chunk +7 lines, -0 lines 0 comments Download
M Source/core/frame/DOMWindow.cpp View 1 1 chunk +19 lines, -0 lines 0 comments Download
M Source/core/frame/LocalDOMWindow.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/frame/LocalDOMWindow.cpp View 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/frame/RemoteDOMWindow.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/frame/RemoteDOMWindow.cpp View 1 chunk +0 lines, -5 lines 0 comments Download
M Source/web/tests/ActivityLoggerTest.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (4 generated)
Yuki
Could you guys review this CL?
5 years, 8 months ago (2015-04-21 09:20:41 UTC) #2
haraken
LGTM, great detective work!
5 years, 8 months ago (2015-04-21 10:14:59 UTC) #3
dcheng
lgtm, thanks for tracking this down!
5 years, 8 months ago (2015-04-21 13:40:33 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1100693002/60001
5 years, 8 months ago (2015-04-22 04:12:14 UTC) #7
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://src.chromium.org/viewvc/blink?view=rev&revision=194193
5 years, 8 months ago (2015-04-22 04:16:38 UTC) #8
alancutter (OOO until 2018)
5 years, 8 months ago (2015-04-22 08:29:18 UTC) #9
Message was sent while issue was closed.
A revert of this CL (patchset #4 id:60001) has been created in
https://codereview.chromium.org/1100893002/ by alancutter@chromium.org.

The reason for reverting is: This causes the following test to fail:
out/Release/browser_tests --gtest_filter=ActivityLogApiTest.TriggerEvent
This is preventing Blink from rolling:
https://codereview.chromium.org/1102483002.

Powered by Google App Engine
This is Rietveld 408576698