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

Issue 924983002: Expose v8 context a MessagePort lives in to give content side code a valid context to (de)serialize… (Closed)

Created:
5 years, 10 months ago by Marijn Kruisselbrink
Modified:
5 years, 10 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Expose v8 context a MessagePort lives in to give content side code a valid context to (de)serialize messages in. This is used in the content side changes in https://codereview.chromium.org/921013002 BUG=426458 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=190944

Patch Set 1 #

Total comments: 1

Patch Set 2 : add a warning that this API should not be used #

Total comments: 3

Patch Set 3 : change to use the world of some event listener #

Total comments: 2

Patch Set 4 : Use a separate (per-MessagePort) v8::Context #

Total comments: 2

Patch Set 5 : dispose context in MessagePort destructor #

Total comments: 4

Patch Set 6 : Add FIXME and include v8.h instead of forward declarations #

Total comments: 1

Patch Set 7 : use v8::Local instead of v8::Handle #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -2 lines) Patch
M Source/core/dom/MessagePort.h View 1 2 3 4 5 6 3 chunks +6 lines, -1 line 0 comments Download
M Source/core/dom/MessagePort.cpp View 1 2 3 4 5 6 2 chunks +18 lines, -0 lines 0 comments Download
M public/platform/WebMessagePortChannelClient.h View 1 2 3 4 5 6 2 chunks +18 lines, -1 line 0 comments Download

Messages

Total messages: 31 (7 generated)
Marijn Kruisselbrink
5 years, 10 months ago (2015-02-18 01:48:19 UTC) #2
adamk
https://codereview.chromium.org/924983002/diff/1/Source/core/dom/MessagePort.h File Source/core/dom/MessagePort.h (right): https://codereview.chromium.org/924983002/diff/1/Source/core/dom/MessagePort.h#newcode116 Source/core/dom/MessagePort.h:116: virtual v8::Handle<v8::Context> scriptContext() override; Exposing a Context like this ...
5 years, 10 months ago (2015-02-18 02:01:21 UTC) #3
Marijn Kruisselbrink
On 2015/02/18 02:01:21, adamk wrote: > https://codereview.chromium.org/924983002/diff/1/Source/core/dom/MessagePort.h > File Source/core/dom/MessagePort.h (right): > > https://codereview.chromium.org/924983002/diff/1/Source/core/dom/MessagePort.h#newcode116 > ...
5 years, 10 months ago (2015-02-18 02:54:14 UTC) #4
adamk
Thanks for the response. I've put up my feelings on this patch over at https://codereview.chromium.org/921013002/#msg10 ...
5 years, 10 months ago (2015-02-18 22:12:48 UTC) #6
Marijn Kruisselbrink
On 2015/02/18 22:12:48, adamk wrote: > Thanks for the response. I've put up my feelings ...
5 years, 10 months ago (2015-02-20 23:13:27 UTC) #8
jochen (gone - plz use gerrit)
https://codereview.chromium.org/924983002/diff/20001/Source/core/dom/MessagePort.cpp File Source/core/dom/MessagePort.cpp (right): https://codereview.chromium.org/924983002/diff/20001/Source/core/dom/MessagePort.cpp#newcode278 Source/core/dom/MessagePort.cpp:278: return toV8Context(executionContext(), DOMWrapperWorld::mainWorld()); what if the message port was ...
5 years, 10 months ago (2015-02-23 12:15:18 UTC) #9
Marijn Kruisselbrink
jochen: any comments on the question of being able to use base (and base::Value specifically) ...
5 years, 10 months ago (2015-02-23 19:20:18 UTC) #10
jochen (gone - plz use gerrit)
On 2015/02/23 at 19:20:18, mek wrote: > jochen: any comments on the question of being ...
5 years, 10 months ago (2015-02-24 10:17:37 UTC) #11
jochen (gone - plz use gerrit)
+haraken@
5 years, 10 months ago (2015-02-24 10:17:48 UTC) #13
haraken
https://codereview.chromium.org/924983002/diff/20001/public/platform/WebMessagePortChannelClient.h File public/platform/WebMessagePortChannelClient.h (right): https://codereview.chromium.org/924983002/diff/20001/public/platform/WebMessagePortChannelClient.h#newcode58 public/platform/WebMessagePortChannelClient.h:58: // Returns the V8 context this message port lives ...
5 years, 10 months ago (2015-02-24 10:35:33 UTC) #14
Marijn Kruisselbrink
On 2015/02/24 10:17:37, jochen (slow) wrote: > On 2015/02/23 at 19:20:18, mek wrote: > > ...
5 years, 10 months ago (2015-02-24 18:54:51 UTC) #15
haraken
https://codereview.chromium.org/924983002/diff/40001/Source/core/dom/MessagePort.cpp File Source/core/dom/MessagePort.cpp (right): https://codereview.chromium.org/924983002/diff/40001/Source/core/dom/MessagePort.cpp#newcode281 Source/core/dom/MessagePort.cpp:281: // port. I don't understand why this is right. ...
5 years, 10 months ago (2015-02-25 07:44:35 UTC) #16
Marijn Kruisselbrink
https://codereview.chromium.org/924983002/diff/40001/Source/core/dom/MessagePort.cpp File Source/core/dom/MessagePort.cpp (right): https://codereview.chromium.org/924983002/diff/40001/Source/core/dom/MessagePort.cpp#newcode281 Source/core/dom/MessagePort.cpp:281: // port. On 2015/02/25 07:44:34, haraken wrote: > > ...
5 years, 10 months ago (2015-02-25 17:35:17 UTC) #17
haraken
On 2015/02/25 17:35:17, Marijn Kruisselbrink wrote: > https://codereview.chromium.org/924983002/diff/40001/Source/core/dom/MessagePort.cpp > File Source/core/dom/MessagePort.cpp (right): > > https://codereview.chromium.org/924983002/diff/40001/Source/core/dom/MessagePort.cpp#newcode281 ...
5 years, 10 months ago (2015-02-25 17:44:01 UTC) #18
Marijn Kruisselbrink
On 2015/02/25 17:44:01, haraken wrote: > On 2015/02/25 17:35:17, Marijn Kruisselbrink wrote: > > > ...
5 years, 10 months ago (2015-02-25 17:57:43 UTC) #19
Marijn Kruisselbrink
On 2015/02/25 17:57:43, Marijn Kruisselbrink wrote: > On 2015/02/25 17:44:01, haraken wrote: > > On ...
5 years, 10 months ago (2015-02-25 18:29:05 UTC) #20
haraken
On 2015/02/25 18:29:05, Marijn Kruisselbrink wrote: > On 2015/02/25 17:57:43, Marijn Kruisselbrink wrote: > > ...
5 years, 10 months ago (2015-02-25 18:40:33 UTC) #21
Marijn Kruisselbrink
https://codereview.chromium.org/924983002/diff/60001/Source/core/dom/MessagePort.cpp File Source/core/dom/MessagePort.cpp (right): https://codereview.chromium.org/924983002/diff/60001/Source/core/dom/MessagePort.cpp#newcode280 Source/core/dom/MessagePort.cpp:280: m_scriptStateForConversion = ScriptState::create(v8::Context::New(isolate), DOMWrapperWorld::create(isolate)); On 2015/02/25 18:40:33, haraken wrote: ...
5 years, 10 months ago (2015-02-25 18:45:09 UTC) #22
haraken
LGTM https://codereview.chromium.org/924983002/diff/80001/public/platform/WebMessagePortChannelClient.h File public/platform/WebMessagePortChannelClient.h (right): https://codereview.chromium.org/924983002/diff/80001/public/platform/WebMessagePortChannelClient.h#newcode34 public/platform/WebMessagePortChannelClient.h:34: namespace v8 { We conventionally just include <v8.h> ...
5 years, 10 months ago (2015-02-25 18:49:59 UTC) #23
Marijn Kruisselbrink
https://codereview.chromium.org/924983002/diff/80001/public/platform/WebMessagePortChannelClient.h File public/platform/WebMessagePortChannelClient.h (right): https://codereview.chromium.org/924983002/diff/80001/public/platform/WebMessagePortChannelClient.h#newcode34 public/platform/WebMessagePortChannelClient.h:34: namespace v8 { On 2015/02/25 18:49:59, haraken wrote: > ...
5 years, 10 months ago (2015-02-25 19:08:51 UTC) #25
haraken
Thanks, LGTM.
5 years, 10 months ago (2015-02-25 20:03:53 UTC) #26
jochen (gone - plz use gerrit)
lgtm https://codereview.chromium.org/924983002/diff/100001/public/platform/WebMessagePortChannelClient.h File public/platform/WebMessagePortChannelClient.h (right): https://codereview.chromium.org/924983002/diff/100001/public/platform/WebMessagePortChannelClient.h#newcode60 public/platform/WebMessagePortChannelClient.h:60: virtual v8::Handle<v8::Context> scriptContextForMessageConversion() = 0; nit. please use ...
5 years, 10 months ago (2015-02-26 15:03:07 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/924983002/120001
5 years, 10 months ago (2015-02-26 17:09:13 UTC) #30
commit-bot: I haz the power
5 years, 10 months ago (2015-02-26 18:13:47 UTC) #31
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=190944

Powered by Google App Engine
This is Rietveld 408576698