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

Issue 986573002: bindings: Use BooleanValue(v8::Context) in V8ErrorHandler (Closed)

Created:
5 years, 9 months ago by bashi
Modified:
5 years, 7 months ago
Reviewers:
haraken, dcarney
CC:
blink-reviews, blink-reviews-bindings_chromium.org, vivekg_samsung, arv+blink, vivekg
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

bindings: Use BooleanValue(v8::Context) in V8ErrorHandler BooleanValue() is going to be deprecated. BUG=462402

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M Source/bindings/core/v8/V8ErrorHandler.cpp View 1 chunk +1 line, -1 line 2 comments Download

Messages

Total messages: 8 (1 generated)
bashi
I'm asking this review to make sure that my understanding is correct. PTAL? https://codereview.chromium.org/986573002/diff/1/Source/bindings/core/v8/V8ErrorHandler.cpp File ...
5 years, 9 months ago (2015-03-06 07:16:18 UTC) #2
dcarney
lgtm https://codereview.chromium.org/986573002/diff/1/Source/bindings/core/v8/V8ErrorHandler.cpp File Source/bindings/core/v8/V8ErrorHandler.cpp (right): https://codereview.chromium.org/986573002/diff/1/Source/bindings/core/v8/V8ErrorHandler.cpp#newcode92 Source/bindings/core/v8/V8ErrorHandler.cpp:92: return returnValue->IsBoolean() && returnValue->BooleanValue(isolate()->GetCurrentContext()).FromJust(); On 2015/03/06 07:16:18, bashi1 ...
5 years, 9 months ago (2015-03-06 07:32:26 UTC) #3
dcarney
sorry, not lgtm. i pushed the wrong button. this cl should be even simpler as ...
5 years, 9 months ago (2015-03-06 07:33:37 UTC) #4
bashi
On 2015/03/06 07:33:37, dcarney wrote: > sorry, not lgtm. i pushed the wrong button. this ...
5 years, 9 months ago (2015-03-06 07:34:36 UTC) #5
bashi
On 2015/03/06 07:34:36, bashi1 wrote: > On 2015/03/06 07:33:37, dcarney wrote: > > sorry, not ...
5 years, 9 months ago (2015-03-06 07:47:39 UTC) #6
dcarney
On 2015/03/06 07:47:39, bashi1 wrote: > On 2015/03/06 07:34:36, bashi1 wrote: > > On 2015/03/06 ...
5 years, 9 months ago (2015-03-06 07:53:42 UTC) #7
bashi
5 years, 9 months ago (2015-03-06 07:59:57 UTC) #8
On 2015/03/06 07:53:42, dcarney wrote:
> On 2015/03/06 07:47:39, bashi1 wrote:
> > On 2015/03/06 07:34:36, bashi1 wrote:
> > > On 2015/03/06 07:33:37, dcarney wrote:
> > > > sorry, not lgtm.  i pushed the wrong button.  this cl should be even
> simpler
> > > as
> > > > stated above
> > > 
> > > Thanks, will use Cast instead.
> > 
> > Should we use v8::BooleanObject instead of v8::Boolean in this case? I got a
> > compiler error when I tried the later.
> 
> returnValue.As<Boolean>.Value()

It seems that I misunderstand something. I got this:

../../v8/include/v8.h:422:49: error: no matching constructor for initialization
of 'Handle<v8::Boolean>'
  template <class S> V8_INLINE Local(S* that) : Handle<T>(that) { }
                                                ^         ~~~~
../../v8/include/v8.h:381:12: note: in instantiation of function template
specialization 'v8::Local<v8::Boolean>::Local<v8::Value>' requested here
    return Local<T>(T::Cast(*that));
           ^
../../v8/include/v8.h:389:22: note: in instantiation of function template
specialization 'v8::Local<v8::Boolean>::Cast<v8::Value>' requested here
    return Local<S>::Cast(*this);
                     ^
../../third_party/WebKit/Source/bindings/core/v8/V8ErrorHandler.cpp:92:52: note:
in instantiation of function template specialization
'v8::Local<v8::Value>::As<v8::Boolean>' requested here
    return returnValue->IsBoolean() && returnValue.As<v8::Boolean>()->Value();
                                                   ^
../../v8/include/v8.h:223:26: note: candidate constructor (the implicit copy
constructor) not viable: no known conversion from 'v8::Value *' to 'const
v8::Handle<v8::Boolean>' for 1st argument
template <class T> class Handle {
                         ^
../../v8/include/v8.h:223:26: note: candidate constructor (the implicit move
constructor) not viable: no known conversion from 'v8::Value *' to
'v8::Handle<v8::Boolean>' for 1st argument
template <class T> class Handle {
                         ^
../../v8/include/v8.h:346:22: note: candidate constructor not viable: cannot
convert from base class pointer 'v8::Value *' to derived class pointer
'v8::Boolean *' for 1st argument
  V8_INLINE explicit Handle(T* val) : val_(val) {}
                     ^
../../v8/include/v8.h:240:32: note: candidate template ignored: could not match
'Handle<type-parameter-0-0>' against 'v8::Value *'
  template <class S> V8_INLINE Handle(Handle<S> that)
                               ^
../../v8/include/v8.h:228:13: note: candidate constructor not viable: requires 0
arguments, but 1 was provided
  V8_INLINE Handle() : val_(0) {}
            ^
1 error generated.

Powered by Google App Engine
This is Rietveld 408576698