I'll do something similar.

Note that blink already uses the new API, but it doesn't need data in the
callbacks - just in the failed access check callbacks.

May I ask what you're using the callbacks for? they're pretty much custom
made for the use case in blink, so chances are they don't do what you think
they do :-/

On Tue, Feb 2, 2016 at 9:58 AM <[email protected]> wrote:

> Thanks for quick reply.
>
> Can you then apply patch above, please?
>
> Missed data looks definitely like a minor mistake during moving to new
> SetAccessCheckCallback
> (here you fix some of data
> https://github.com/v8/v8/commit/e2675937d5b6d2e555edeaabcda7ce70551ea236).
> I checked blink code and if one decides to move to SetAccessCheckCallback
> there, passing data to callback is a must.
>
>
> On Tuesday, February 2, 2016 at 10:36:58 AM UTC+2, Jochen Eisinger wrote:
>>
>> afaik there was no reason to drop data from the callback other that we
>> didn't know of anybody using it.
>>
>
>
>
>> I guess it's fine to add it back.
>>
>> On Mon, Feb 1, 2016 at 10:44 PM <[email protected]> wrote:
>>
> I guess something like this may allow data passing to callback:
>>>
>>> diff --git a/include/v8.h b/include/v8.h
>>> index 171623a..afeb043 100644
>>> --- a/include/v8.h
>>> +++ b/include/v8.h
>>> @@ -4322,7 +4322,8 @@ enum AccessType {
>>>   * object.
>>>   */
>>>
>>>  typedef bool (*AccessCheckCallback)(Local<Context> accessing_context,
>>> -                                    Local<Object> accessed_object);
>>> +                                    Local<Object> accessed_object,
>>> +                                    Local<Value> data = Local<Value>());
>>>
>>>
>>>  /**
>>> diff --git a/src/isolate.cc b/src/isolate.cc
>>> index 40d4c9f..2d15420 100644
>>> --- a/src/isolate.cc
>>> +++ b/src/isolate.cc
>>> @@ -843,7 +843,8 @@ bool Isolate::MayAccess(Handle<Context>
>>> accessing_context,
>>>      VMState<EXTERNAL> state(this);
>>>      if (callback) {
>>>        return callback(v8::Utils::ToLocal(accessing_context),
>>> -                      v8::Utils::ToLocal(receiver));
>>> +                      v8::Utils::ToLocal(receiver),
>>> +                      v8::Utils::ToLocal(data));
>>>      }
>>>      Handle<Object> key = factory()->undefined_value();
>>>      return named_callback(v8::Utils::ToLocal(receiver), v8::Utils::
>>> ToLocal(key),
>>>
>>>
>>> didn't tried it yet, but is idea correct or there was some other reason
>>> to drop data?
>>>
>>> --
>>> --
>>> 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.
>>>
>> --
> --
> 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.
>

-- 
-- 
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.

Reply via email to