On 2014/10/01 13:48:29, aandrey wrote:
On 2014/10/01 13:45:38, aandrey wrote:
> On 2014/10/01 13:37:23, Yang wrote:
> > On 2014/10/01 13:21:02, aandrey wrote:
> > > https://codereview.chromium.org/617263003/diff/1/src/api.cc
> > > File src/api.cc (right):
> > >
> > >
https://codereview.chromium.org/617263003/diff/1/src/api.cc#newcode5611
> > > src/api.cc:5611: Isolate* v8::Object::GetIsolate() {
> > > v8::Value ?
> >
> > unfortunately we can't get the isolate from a Smi, which belongs to
v8::Value.
>
> In all v8::Value methods we cast "this" to i::Handle<i::Object>, so
> if we just replace v8::Object::GetIsolate to v8::Value::GetIsolate it
will
> compile, right?
>
> We can return nullptr isolate for some Value's, or CurrentIsolate.
>
> bool Value::IsInt32() const {
> i::Handle<i::Object> obj = Utils::OpenHandle(this);
> if (obj->IsSmi()) return true;
> // ...
> }
Nevermind. GetIsolate is method of HeapObject, not Object.
Although this won't allow to get isolate for an Oddball object (undefined,
null).
https://codereview.chromium.org/617263003/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.