| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some extreme cases, ObjectTemplate::NewInstance might return an empty
handler. For example, the getter and setter
Object.prototype.constructor can be rewritten with a evil function which
can throw exceptions.
BUG=331301
TEST=gin_unittests --gtest_filter=WrappableTest.ErrorInObjectConstructorProperty
Review URL: https://codereview.chromium.org/184253004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254109 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
This is needed for: https://codereview.chromium.org/116163008/
Review URL: https://codereview.chromium.org/118423004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241730 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of explicitly registering object templates for all wrapper
infos, add a method on wrappable that returns the template when
needed.
BUG=none
R=aa@chromium.org,abarth@chromium.org
Review URL: https://codereview.chromium.org/113893005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241370 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=
Review URL: https://codereview.chromium.org/105743007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239387 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: https://codereview.chromium.org/107113005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239204 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also:
- Added support for computed properties to ObjectTemplateBuilder
- Realized it was possible for CreateFunctionTemplate to be just one template
BUG=
R=abarth@chromium.org, jyasskin@chromium.org
Review URL: https://codereview.chromium.org/103703002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239126 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than using reference counting to keep gin::Wrappable objects alive, we
use the V8 garbage collector. To retain a reference to a wrappable object on
the stack, use a gin::Handle. Currently there is no mechanism for retaining a
gin::Wrappable object in the heap, but we'll likely add one in the future.
R=aa@chromium.org
BUG=none
Review URL: https://codereview.chromium.org/105423003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238902 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=
Review URL: https://codereview.chromium.org/89723002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237492 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL connects mojo_js with hello_world_service. After this
CL, the JavaScript and C++ implementations have reached
parity.
BUG=317398
Review URL: https://codereview.chromium.org/82953004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237018 0039d316-1c4b-4281-b951-d872f2087c98
|
|
This CL adds a mechanism for wrapping C++ objects to Gin. The approach in this
CL is similar to Blink's ScriptWrappable class, with a couple of differences:
1) gin::Wrappable has a vtable whereas Blink's ScriptWrappable class does not.
Having a vtable in this base class lets us simplify a large number of
concerns. We've talked about adding a vtable to ScriptWrappable but have
avoided it because Blink creates many thousands of wrapped objects. When we
refactor Blink to use Gin, we can still support the non-vtable approach, but
most clients of Gin will want the simpler approach.
2) In Gin, we've bound together the notion of being reference counted with the
notion of being wrappable from JavaScript. In Blink, those concepts are
separate because we don't want to introduce a virtual destructor for
ScriptWrappable. However, because gin::Wrappable already has a vtable,
adding a virtual destructor is relatively cheap.
Actually wrapping a C++ object still takes too much typing, but we can improve
that in future CLs.
R=jochen@chromium.org
BUG=317398
Review URL: https://codereview.chromium.org/79203004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236555 0039d316-1c4b-4281-b951-d872f2087c98
|