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

Issue 440243003: Add NativeValueTraits for ScriptValue to V8Bindings. (Closed)

Created:
6 years, 4 months ago by gavinp
Modified:
6 years, 4 months ago
Reviewers:
haraken, yhirano
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink, abarth-chromium
Project:
blink
Visibility:
Public.

Description

Add NativeValueTraits for ScriptValue to V8Bindings. Argument conversion, particularly variadic argument conversion, goes through toNativeArray<>(), which means that this is needed to support idl for arguments of type "any...". R=haraken@chromium.org BUG=None Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179856

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -0 lines) Patch
M Source/bindings/core/v8/V8Binding.h View 1 chunk +8 lines, -0 lines 1 comment Download
M Source/bindings/core/v8/V8BindingTest.cpp View 2 chunks +62 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
gavinp
Hara-san: PTAL. Hirano-san: FYI. You have seen this bindings code before; in the CL https://codereview.chromium.org/434543002/ ...
6 years, 4 months ago (2014-08-05 23:06:20 UTC) #1
haraken
https://codereview.chromium.org/440243003/diff/1/Source/bindings/core/v8/V8Binding.h File Source/bindings/core/v8/V8Binding.h (right): https://codereview.chromium.org/440243003/diff/1/Source/bindings/core/v8/V8Binding.h#newcode616 Source/bindings/core/v8/V8Binding.h:616: return ScriptValue(ScriptState::current(isolate), value); I'm a bit concerned about this. ...
6 years, 4 months ago (2014-08-06 00:55:11 UTC) #2
gavinp
On 2014/08/06 00:55:11, haraken wrote: > https://codereview.chromium.org/440243003/diff/1/Source/bindings/core/v8/V8Binding.h > File Source/bindings/core/v8/V8Binding.h (right): > > https://codereview.chromium.org/440243003/diff/1/Source/bindings/core/v8/V8Binding.h#newcode616 > ...
6 years, 4 months ago (2014-08-06 01:30:08 UTC) #3
gavinp
On 2014/08/06 01:30:08, gavinp wrote: > On 2014/08/06 00:55:11, haraken wrote: > > > https://codereview.chromium.org/440243003/diff/1/Source/bindings/core/v8/V8Binding.h ...
6 years, 4 months ago (2014-08-06 01:32:23 UTC) #4
haraken
On 2014/08/06 01:32:23, gavinp wrote: > On 2014/08/06 01:30:08, gavinp wrote: > > On 2014/08/06 ...
6 years, 4 months ago (2014-08-06 01:37:09 UTC) #5
gavinp
On 2014/08/06 01:32:23, gavinp wrote: > On 2014/08/06 01:30:08, gavinp wrote: > > On 2014/08/06 ...
6 years, 4 months ago (2014-08-06 01:42:36 UTC) #6
haraken
Discussed offline. The ServiceWorker API has changed, so it looks like we no longer need ...
6 years, 4 months ago (2014-08-06 01:42:36 UTC) #7
gavinp
I spoke too soon: still needed in the downstream patch for sequence<any>. What are we ...
6 years, 4 months ago (2014-08-07 01:29:25 UTC) #8
haraken
LGTM I checked all call sites of nativeValue(). The nativeValue() is used only by toNativeArray() ...
6 years, 4 months ago (2014-08-07 06:22:05 UTC) #9
gavinp
Thanks Hara-san! I am going to land this, because it is a fix for the ...
6 years, 4 months ago (2014-08-08 17:27:32 UTC) #10
gavinp
The CQ bit was checked by gavinp@chromium.org
6 years, 4 months ago (2014-08-08 17:28:35 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gavinp@chromium.org/440243003/1
6 years, 4 months ago (2014-08-08 17:29:10 UTC) #12
gavinp
On 2014/08/08 17:27:32, gavinp wrote: > Thanks Hara-san! > > I am going to land ...
6 years, 4 months ago (2014-08-08 17:29:37 UTC) #13
commit-bot: I haz the power
Change committed as 179856
6 years, 4 months ago (2014-08-08 18:54:21 UTC) #14
haraken
6 years, 4 months ago (2014-08-09 00:49:28 UTC) #15
Message was sent while issue was closed.
On 2014/08/08 17:29:37, gavinp wrote:
> On 2014/08/08 17:27:32, gavinp wrote:
> > Thanks Hara-san!
> > 
> > I am going to land this, because it is a fix for the issue at hand. However,
I
> > share the concern that these methods could be called from bad contexts; so
> > please include me on downstream reviews for that, or ask for my help fixing
> > them. I'm really interested in bindings now that I've run into limitations
> twice
> > in two IDL files I've written.
> 
> BTW, I think one of the easiest ways to fix this is: make a downstream IDL
only
> include file with the "unsafe" bindings, then a DEPS rule to guard against any
> use of that #include from anything other than IDL output.
> 
> Thoughts?

Ideally we want to limit the usage of ScriptState::current to bindings/.
However, there are a bunch of code that is calling ScriptState::current
(directly and indirectly) from core/, and we're not yet getting there. We should
aim at getting there.

Powered by Google App Engine
This is Rietveld 408576698