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

Issue 16904002: Avoid leaking objects between isolated worlds via attribute event listeners (Closed)

Created:
7 years, 6 months ago by adamk
Modified:
7 years, 6 months ago
Reviewers:
abarth-chromium
CC:
blink-reviews, eustas+blink_chromium.org, caseq+blink_chromium.org, aandrey+blink_chromium.org, loislo+blink_chromium.org, jsbell+bindings_chromium.org, pfeldman+blink_chromium.org, alph+blink_chromium.org, eae+blinkwatch, yurys+blink_chromium.org, lushnikov+blink_chromium.org, abarth-chromium, vsevik+blink_chromium.org, marja+watch_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, adamk+blink_chromium.org, haraken, Nate Chapin
Visibility:
Public.

Description

Avoid leaking objects between isolated worlds via attribute event listeners This patch adds an isolatedWorld argument to the setters and getters for attribute event listeners (e.g., document.onload). When called from the bindings, this is appropriately set to either the current isolated world or null (which can be the case for either the main world or a worker). When these methods are called from within Blink, we always default to the "normal" (main or worker) case. R=abarth BUG=87520 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=152377

Patch Set 1 #

Total comments: 7

Patch Set 2 : Respond to review comments #

Patch Set 3 : Test a bit more #

Patch Set 4 : Patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -48 lines) Patch
A LayoutTests/fast/dom/event-attrs-isolated-world.html View 1 2 1 chunk +33 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/event-attrs-isolated-world-expected.txt View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/scripts/CodeGeneratorV8.pm View 1 2 3 3 chunks +10 lines, -12 lines 0 comments Download
M Source/bindings/v8/V8AbstractEventListener.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/V8Binding.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M Source/bindings/v8/V8Binding.cpp View 1 1 chunk +11 lines, -0 lines 0 comments Download
M Source/core/dom/Document.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M Source/core/dom/EventListener.h View 2 chunks +3 lines, -1 line 0 comments Download
M Source/core/dom/EventTarget.h View 1 2 chunks +16 lines, -15 lines 0 comments Download
M Source/core/dom/EventTarget.cpp View 1 2 chunks +19 lines, -7 lines 0 comments Download
M Source/core/dom/MessagePort.h View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/page/DOMWindow.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/notifications/Notification.h View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
adamk
7 years, 6 months ago (2013-06-13 00:14:28 UTC) #1
adamk
https://codereview.chromium.org/16904002/diff/1/Source/core/dom/EventTarget.cpp File Source/core/dom/EventTarget.cpp (right): https://codereview.chromium.org/16904002/diff/1/Source/core/dom/EventTarget.cpp#newcode122 Source/core/dom/EventTarget.cpp:122: if ((listenerWorld && listenerWorld->isMainWorld() && !world) This is the ...
7 years, 6 months ago (2013-06-13 00:18:08 UTC) #2
abarth-chromium
LGTM https://codereview.chromium.org/16904002/diff/1/Source/core/dom/EventTarget.cpp File Source/core/dom/EventTarget.cpp (right): https://codereview.chromium.org/16904002/diff/1/Source/core/dom/EventTarget.cpp#newcode122 Source/core/dom/EventTarget.cpp:122: if ((listenerWorld && listenerWorld->isMainWorld() && !world) We talked ...
7 years, 6 months ago (2013-06-13 00:30:44 UTC) #3
abarth-chromium
(Please update the description with something more descriptive.)
7 years, 6 months ago (2013-06-13 00:31:00 UTC) #4
marja
https://codereview.chromium.org/16904002/diff/1/Source/bindings/v8/V8Binding.cpp File Source/bindings/v8/V8Binding.cpp (right): https://codereview.chromium.org/16904002/diff/1/Source/bindings/v8/V8Binding.cpp#newcode436 Source/bindings/v8/V8Binding.cpp:436: DOMWrapperWorld* worldForIsolate(v8::Isolate* isolate) The name is slightly confusing, since ...
7 years, 6 months ago (2013-06-13 13:56:29 UTC) #5
adamk
Thanks for the review, I've updated the change description and taken care of the comments ...
7 years, 6 months ago (2013-06-13 18:55:06 UTC) #6
abarth-chromium
LGTM yeah, your version of that stanza is better. :)
7 years, 6 months ago (2013-06-13 19:16:59 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/adamk@chromium.org/16904002/25001
7 years, 6 months ago (2013-06-13 19:19:23 UTC) #8
commit-bot: I haz the power
7 years, 6 months ago (2013-06-13 20:52:52 UTC) #9
Message was sent while issue was closed.
Change committed as 152377

Powered by Google App Engine
This is Rietveld 408576698