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

Issue 314953005: Add an ASSERT about cross-world wrapper leakage into ScriptValue (Closed)

Created:
6 years, 6 months ago by haraken
Modified:
6 years, 1 month ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink
Visibility:
Public.

Description

Add an ASSERT about cross-world wrapper leakage into ScriptValue - This CL adds an ASSERT to ScriptValue to verify that ScriptValue::v8Value() is used in the same world that created the ScriptValue. - To insert the check, we need to get a current world in ScriptValue::v8Value(). For that goal, this CL makes sure that we're in some context when calling ScriptValue::v8Value(). BUG=341032 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175837 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175944

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -66 lines) Patch
M Source/bindings/v8/ScriptController.h View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/v8/ScriptController.cpp View 1 2 3 4 5 6 6 chunks +16 lines, -12 lines 1 comment Download
M Source/bindings/v8/ScriptPreprocessor.cpp View 1 2 3 4 5 6 2 chunks +5 lines, -4 lines 0 comments Download
M Source/bindings/v8/ScriptPromise.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/v8/ScriptPromise.cpp View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M Source/bindings/v8/ScriptPromiseTest.cpp View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/v8/ScriptValue.h View 3 chunks +3 lines, -4 lines 0 comments Download
M Source/bindings/v8/ScriptValue.cpp View 1 2 3 1 chunk +18 lines, -1 line 0 comments Download
M Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/inspector/InjectedScript.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/inspector/InjectedScriptBase.h View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M Source/core/inspector/InjectedScriptBase.cpp View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/inspector/InjectedScriptHost.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/core/inspector/JavaScriptCallFrame.cpp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/testing/Internals.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M Source/modules/serviceworkers/FetchEvent.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/serviceworkers/FetchEvent.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M Source/modules/serviceworkers/FetchEvent.idl View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/serviceworkers/InstallPhaseEvent.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/serviceworkers/InstallPhaseEvent.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M Source/modules/serviceworkers/InstallPhaseEvent.idl View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/serviceworkers/RespondWithObserver.h View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M Source/modules/serviceworkers/RespondWithObserver.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M Source/modules/serviceworkers/WaitUntilObserver.h View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M Source/modules/serviceworkers/WaitUntilObserver.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 5 6 7 5 chunks +10 lines, -8 lines 0 comments Download
M Source/web/WebPluginContainerImpl.cpp View 1 2 3 4 5 6 7 1 chunk +5 lines, -4 lines 0 comments Download

Messages

Total messages: 14 (1 generated)
haraken
PTAL
6 years, 6 months ago (2014-06-09 10:48:39 UTC) #1
haraken
abarth@: Looks like jochen and adamk are ooo. Would you take a look at this ...
6 years, 6 months ago (2014-06-09 23:22:54 UTC) #2
abarth-chromium
On 2014/06/09 at 23:22:54, haraken wrote: > abarth@: Looks like jochen and adamk are ooo. ...
6 years, 6 months ago (2014-06-10 00:03:14 UTC) #3
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 6 months ago (2014-06-10 00:35:13 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/314953005/120001
6 years, 6 months ago (2014-06-10 00:35:42 UTC) #5
commit-bot: I haz the power
Change committed as 175837
6 years, 6 months ago (2014-06-10 00:46:55 UTC) #6
dcheng
A revert of this CL has been created in https://codereview.chromium.org/326853002/ by dcheng@chromium.org. The reason for ...
6 years, 6 months ago (2014-06-10 06:08:28 UTC) #7
haraken
On 2014/06/10 06:08:28, dcheng wrote: > A revert of this CL has been created in ...
6 years, 6 months ago (2014-06-11 03:58:10 UTC) #8
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 6 months ago (2014-06-11 03:58:14 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/314953005/160001
6 years, 6 months ago (2014-06-11 03:59:15 UTC) #10
commit-bot: I haz the power
Change committed as 175944
6 years, 6 months ago (2014-06-11 05:08:19 UTC) #11
pguyot
There is a bug in this commit that added escaping around ScriptValue, yielding a crash ...
6 years, 1 month ago (2014-11-08 19:28:40 UTC) #13
haraken
6 years, 1 month ago (2014-11-10 04:09:18 UTC) #14
Message was sent while issue was closed.
On 2014/11/08 19:28:40, pguyot wrote:
> There is a bug in this commit that added escaping around ScriptValue, yielding
a
> crash in executeScriptInIsolatedWorld if there is more than one script to
> execute.
> 
>
https://codereview.chromium.org/314953005/diff/160001/Source/bindings/v8/Scri...
> File Source/bindings/v8/ScriptController.cpp (right):
> 
>
https://codereview.chromium.org/314953005/diff/160001/Source/bindings/v8/Scri...
> Source/bindings/v8/ScriptController.cpp:614:
> results->append(handleScope.Escape(resultArray->Get(i)));
> EscapableHandleScope::Escape is supposed to be called only once, while here it
> is called once per script result, consequently yielding crashes if there is
more
> than one script.

Uploaded a fix here: https://codereview.chromium.org/713743002/

Powered by Google App Engine
This is Rietveld 408576698