On Wed, Apr 29, 2009 at 10:41 PM, Mike Belshe <mbel...@google.com> wrote:

> On Wed, Apr 29, 2009 at 6:47 PM, Marshall Greenblatt <
> magreenbl...@gmail.com> wrote:
>
>> Hi All,
>>
>> I'm excited about using v8::Extension instead of CppBoundClass but the
>> JavaScript side of v8::Extension (via the |source| argument) seems a bit
>> magical to me.  Is there a document that explains the usage and capabilities
>> of v8::Extension in greater detail?  I have the following questions so far:
>
>
> Yeah, we need to write a document.  Sorry about that.
>

Not a problem, I look forward to reading the document once it exists :-).


>
>> 3. Is there a way to specify native getter/setter functions for a property
>> defined on the JS side?  For instance, "myobject.foo = bar" would somehow
>> call a natively defined "setFoo" function with the "bar" argument.  If this
>> isn't possible, are there any plans to support native properties directly?
>
>
> No plans to do that.  Keep in mind that exposing C++ directly to JS should
> be done with great care.  Remember you're expanding the surface area of
> attack.
>

Well, I wouldn't think defining native getter/setter functions for a JS
property would be any "worse" from an exposure standpoint then creating
native get()/set() functions.  After all, the end result in either case will
be a call to a single C++ function originating from JS with some number of
arguments.  But I accept that minimizing v8::Extension complexity for the
consumer is more important than duplicating all CppBoundClass capabilities.


>
> Mike
>
>
>
>
>>
>>
>> Thanks,
>> Marshall
>>
>>
>> On Tue, Apr 28, 2009 at 9:39 PM, Mike Belshe <mbel...@google.com> wrote:
>>
>>> Yup.  I am not saying we need to get rid of all of it immediately; just
>>> put some comments in the header so that we don't use it *more*.....
>>> Mike
>>>
>>>
>>> On Tue, Apr 28, 2009 at 6:38 PM, Feng Qian <fq...@google.com> wrote:
>>>
>>>> CppBindingClass was started for test_shell if I remember correctly,
>>>> and I think the functionality can be replaced by using NPAPI instead.
>>>> I had an implementation of replacing CppBindingClass by NPAPI in
>>>> test_shell (to avoid two implementations for JSC and V8), I don't
>>>> remember where the code went.
>>>>
>>>> On Tue, Apr 28, 2009 at 6:15 PM, Mike Belshe <mbel...@google.com>
>>>> wrote:
>>>> > I've felt this way for a while, and I figured I'd throw it out to see
>>>> if we
>>>> > all agree.
>>>> > I'm hoping we can deprecate CppBindingClass.  At this point, most
>>>> extensions
>>>> > are better served (I think!) via the v8::extension facility than the
>>>> > CppBindingObject.  If there are cases where this isn't true, I'd
>>>> happily
>>>> > work on v8::extension to make it so it could be.
>>>> > If nobody objects, I hope we can agree to stop adding any new
>>>> > CppBindingClass based bindings, and then over time get rid of
>>>> > CppBindingObject altogether.
>>>> > Anyone feel strongly in opposition?
>>>> >
>>>> > Mike
>>>> >
>>>> > >
>>>> >
>>>>
>>>
>>>
>>>
>>>
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to