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

Issue 332993002: Replace ContentSecurityPolicy::client() with a method returning an ExecutionContext (Closed)

Created:
6 years, 6 months ago by tyoshino (SeeGerritForStatus)
Modified:
6 years, 6 months ago
CC:
blink-reviews, tkent
Project:
blink
Visibility:
Public.

Description

Replace ContentSecurityPolicy::client() with a method returning an ExecutionContext As bug305497 is marked WontFix, I'd like to merge back ExecutionContextClient to ExecutionContext for readability. This is 1st step for that. Note about behavior change induced by this CL addConsoleMessage(): When addConsoleMessage() is called via ExecutionContextClient, it just calls addMessage(). But ExecutionContext has non-virtual addConsoleMessage() which checks if m_client is non-NULL. We'll call the latter after this CL. If this change breaks something, that means such an addConsoleMessage() call has been invalid since it's called on an ExecutionContext that is already partially destructed. isDocument(): OK for the same reason. disableEval(): OK for the same reason. securityContext() and reportBlockedScriptExecutionToInspector(): No change as ExecutionContext doesn't have a non-virtual override for it. contextURL() and contextCompleteURL(): No change as they're implemented only on ExecutionContextClient. BUG=305497 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176183

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 3

Patch Set 6 : Changed ContentSecurityPolicy::document() to use m_executionContext directly #

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -31 lines) Patch
M Source/core/dom/ExecutionContext.h View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M Source/core/dom/ExecutionContext.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/dom/ExecutionContextClient.h View 1 2 3 2 chunks +0 lines, -5 lines 0 comments Download
M Source/core/dom/MainThreadTaskRunnerTest.cpp View 1 2 3 4 5 6 3 chunks +13 lines, -1 line 0 comments Download
M Source/core/frame/csp/CSPDirectiveList.cpp View 2 chunks +3 lines, -4 lines 0 comments Download
M Source/core/frame/csp/ContentSecurityPolicy.h View 1 2 3 4 5 5 chunks +7 lines, -7 lines 0 comments Download
M Source/core/frame/csp/ContentSecurityPolicy.cpp View 1 2 3 4 5 6 6 chunks +11 lines, -11 lines 0 comments Download
M Source/modules/indexeddb/IDBRequestTest.cpp View 1 2 3 4 5 6 3 chunks +12 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
tyoshino (SeeGerritForStatus)
6 years, 6 months ago (2014-06-13 08:46:48 UTC) #1
haraken
https://codereview.chromium.org/332993002/diff/80001/Source/core/frame/csp/ContentSecurityPolicy.h File Source/core/frame/csp/ContentSecurityPolicy.h (right): https://codereview.chromium.org/332993002/diff/80001/Source/core/frame/csp/ContentSecurityPolicy.h#newcode188 Source/core/frame/csp/ContentSecurityPolicy.h:188: ExecutionContext* m_executionContext; Just to confirm: Before this CL, it ...
6 years, 6 months ago (2014-06-13 09:09:21 UTC) #2
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/332993002/diff/80001/Source/core/frame/csp/ContentSecurityPolicy.h File Source/core/frame/csp/ContentSecurityPolicy.h (right): https://codereview.chromium.org/332993002/diff/80001/Source/core/frame/csp/ContentSecurityPolicy.h#newcode188 Source/core/frame/csp/ContentSecurityPolicy.h:188: ExecutionContext* m_executionContext; On 2014/06/13 09:09:21, haraken wrote: > > ...
6 years, 6 months ago (2014-06-13 09:29:16 UTC) #3
haraken
On 2014/06/13 09:29:16, tyoshino wrote: > https://codereview.chromium.org/332993002/diff/80001/Source/core/frame/csp/ContentSecurityPolicy.h > File Source/core/frame/csp/ContentSecurityPolicy.h (right): > > https://codereview.chromium.org/332993002/diff/80001/Source/core/frame/csp/ContentSecurityPolicy.h#newcode188 > ...
6 years, 6 months ago (2014-06-13 09:37:48 UTC) #4
tyoshino (SeeGerritForStatus)
Thank you After haraken's review, I made one trivial change. https://codereview.chromium.org/332993002/diff/80001/Source/core/frame/csp/ContentSecurityPolicy.h File Source/core/frame/csp/ContentSecurityPolicy.h (right): https://codereview.chromium.org/332993002/diff/80001/Source/core/frame/csp/ContentSecurityPolicy.h#newcode177 ...
6 years, 6 months ago (2014-06-13 10:46:47 UTC) #5
gmorrita
lgtm.
6 years, 6 months ago (2014-06-13 16:46:55 UTC) #6
tyoshino (SeeGerritForStatus)
The CQ bit was checked by tyoshino@chromium.org
6 years, 6 months ago (2014-06-16 06:47:11 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tyoshino@chromium.org/332993002/120001
6 years, 6 months ago (2014-06-16 06:47:46 UTC) #8
commit-bot: I haz the power
6 years, 6 months ago (2014-06-16 07:54:12 UTC) #9
Message was sent while issue was closed.
Change committed as 176183

Powered by Google App Engine
This is Rietveld 408576698