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

Issue 1287103002: [Extension ServiceWorkers] Blink: Passing v8::context to extensions dispatcher (Closed)

Created:
5 years, 4 months ago by annekao
Modified:
5 years, 4 months ago
CC:
blink-reviews, blink-worker-reviews_chromium.org, dglazkov+blink, horo+watch_chromium.org, not at google - send to devlin, kinuko+worker_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

[Extension ServiceWorkers] Blink: Passing v8::context to extensions dispatcher This patch is to address a reverted patch (https://codereview.chromium.org/1264913002/). At line 253 in WorkerThread.cpp, the original check was script()->scriptState()->contextIsValid() which can crash if the scriptState is null. This patch was reverted and is now changed to script()->isContextInitialized(). isContextInitialized was also changed from a private to a public function. BUG=501569 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200696

Patch Set 1 : previous reverted patch (1264913002) #

Patch Set 2 : change script()->scriptState()->contextIsValid to script()->isContextInitialized() #

Total comments: 2

Patch Set 3 : #

Total comments: 6

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -1 line) Patch
M Source/bindings/core/v8/WorkerScriptController.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/workers/WorkerReportingProxy.h View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/workers/WorkerThread.cpp View 1 1 chunk +4 lines, -0 lines 0 comments Download
M Source/web/ServiceWorkerGlobalScopeProxy.h View 1 2 3 3 chunks +3 lines, -0 lines 0 comments Download
M Source/web/ServiceWorkerGlobalScopeProxy.cpp View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M public/web/modules/serviceworker/WebServiceWorkerContextClient.h View 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (12 generated)
annekao
5 years, 4 months ago (2015-08-12 18:33:48 UTC) #3
falken
+kinuko It'd be nice to have a test for the case where isContextInitialized returns false, ...
5 years, 4 months ago (2015-08-13 02:28:19 UTC) #5
annekao
On 2015/08/13 02:28:19, falken wrote: > Did you manually see what happens if script->initializeContextIfNeeded(); is ...
5 years, 4 months ago (2015-08-13 17:07:25 UTC) #6
Devlin
falken and kinuko know this better than me, so I'll let them handle it. My ...
5 years, 4 months ago (2015-08-13 17:40:11 UTC) #7
falken
OK lgtm. We'll think more how to test as part of https://code.google.com/p/chromium/issues/detail?id=519111
5 years, 4 months ago (2015-08-14 00:59:58 UTC) #8
dcheng
lgtm
5 years, 4 months ago (2015-08-14 01:10:27 UTC) #9
haraken
bindings/ LGTM
5 years, 4 months ago (2015-08-14 01:11:13 UTC) #10
falken
On 2015/08/13 17:07:25, annekao wrote: > On 2015/08/13 02:28:19, falken wrote: > > Did you ...
5 years, 4 months ago (2015-08-14 01:19:03 UTC) #11
kinuko
https://codereview.chromium.org/1287103002/diff/20001/Source/web/ServiceWorkerGlobalScopeProxy.cpp File Source/web/ServiceWorkerGlobalScopeProxy.cpp (right): https://codereview.chromium.org/1287103002/diff/20001/Source/web/ServiceWorkerGlobalScopeProxy.cpp#newcode211 Source/web/ServiceWorkerGlobalScopeProxy.cpp:211: m_client.didInitializeWorkerContext(m_workerGlobalScope->script()->context(), WebURL(m_document.url())); KURL m_document.url() is not thread safe, I ...
5 years, 4 months ago (2015-08-14 01:37:35 UTC) #12
annekao
https://codereview.chromium.org/1287103002/diff/20001/Source/web/ServiceWorkerGlobalScopeProxy.cpp File Source/web/ServiceWorkerGlobalScopeProxy.cpp (right): https://codereview.chromium.org/1287103002/diff/20001/Source/web/ServiceWorkerGlobalScopeProxy.cpp#newcode211 Source/web/ServiceWorkerGlobalScopeProxy.cpp:211: m_client.didInitializeWorkerContext(m_workerGlobalScope->script()->context(), WebURL(m_document.url())); On 2015/08/14 01:37:34, kinuko wrote: > KURL ...
5 years, 4 months ago (2015-08-14 19:44:23 UTC) #14
kinuko (google)
lgtm https://codereview.chromium.org/1287103002/diff/60001/Source/bindings/core/v8/WorkerScriptController.h File Source/bindings/core/v8/WorkerScriptController.h (right): https://codereview.chromium.org/1287103002/diff/60001/Source/bindings/core/v8/WorkerScriptController.h#newcode89 Source/bindings/core/v8/WorkerScriptController.h:89: bool isContextInitialized() { return m_scriptState && !!m_scriptState->perContextData(); } ...
5 years, 4 months ago (2015-08-17 10:27:20 UTC) #16
kinuko
On 2015/08/17 10:27:20, kinuko (google) wrote: > lgtm > > https://codereview.chromium.org/1287103002/diff/60001/Source/bindings/core/v8/WorkerScriptController.h > File Source/bindings/core/v8/WorkerScriptController.h (right): ...
5 years, 4 months ago (2015-08-17 10:54:58 UTC) #17
annekao
https://codereview.chromium.org/1287103002/diff/60001/Source/bindings/core/v8/WorkerScriptController.h File Source/bindings/core/v8/WorkerScriptController.h (right): https://codereview.chromium.org/1287103002/diff/60001/Source/bindings/core/v8/WorkerScriptController.h#newcode89 Source/bindings/core/v8/WorkerScriptController.h:89: bool isContextInitialized() { return m_scriptState && !!m_scriptState->perContextData(); } On ...
5 years, 4 months ago (2015-08-17 19:47:41 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1287103002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1287103002/100001
5 years, 4 months ago (2015-08-17 22:58:52 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/94335)
5 years, 4 months ago (2015-08-18 00:46:13 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1287103002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1287103002/100001
5 years, 4 months ago (2015-08-18 00:59:50 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/99465)
5 years, 4 months ago (2015-08-18 01:58:33 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1287103002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1287103002/100001
5 years, 4 months ago (2015-08-18 04:34:29 UTC) #30
commit-bot: I haz the power
5 years, 4 months ago (2015-08-18 04:40:30 UTC) #31
Message was sent while issue was closed.
Committed patchset #4 (id:100001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=200696

Powered by Google App Engine
This is Rietveld 408576698