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

Issue 117063002: IDL compiler: [RaisesException] interface type attribute (Closed)

Created:
7 years ago by Nils Barth (inactive)
Modified:
6 years, 9 months ago
Reviewers:
haraken
CC:
blink-reviews, kojih, arv+blink, jsbell+bindings_chromium.org, sof, abarth-chromium, marja+watch_chromium.org, adamk+blink_chromium.org, Nate Chapin, Inactive, kouhei (in TOK)
Visibility:
Public.

Description

IDL compiler: [RaisesException] interface type attribute Interface attributes that [RaiseException] (on getter) (also nullable attributes) have a slight wrinkle: we may need to call .release() on jsValue when calling v8SetReturn*. This changes the *r*value of |cpp_value|, but not the lvalue (we don't call |release| on assignment!), so fix by introducing an local auxiliary |cpp_rvalue| variable in the Python code for the getter. BUG=239771 R=haraken NOTRY=true

Patch Set 1 #

Patch Set 2 : Simpler logic #

Patch Set 3 : Fix comment #

Patch Set 4 : EventHandler #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -8 lines) Patch
M Source/bindings/scripts/unstable/v8_attributes.py View 1 2 3 1 chunk +14 lines, -8 lines 0 comments Download
M Source/bindings/tests/idls/TestObjectPython.idl View 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestObjectPython.cpp View 1 2 3 2 chunks +34 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Nils Barth (inactive)
7 years ago (2013-12-17 07:57:04 UTC) #1
haraken
I wonder why we need to call .release() only for constructors that have [RaisesException]. Can't ...
7 years ago (2013-12-17 08:35:41 UTC) #2
Nils Barth (inactive)
On 2013/12/17 08:35:41, haraken wrote: > I wonder why we need to call .release() only ...
7 years ago (2013-12-18 06:27:53 UTC) #3
Nils Barth (inactive)
PTAL (revised logic to clarify)
7 years ago (2013-12-18 06:30:40 UTC) #4
haraken
On 2013/12/18 06:27:53, Nils Barth wrote: > On 2013/12/17 08:35:41, haraken wrote: > > I ...
7 years ago (2013-12-18 06:57:45 UTC) #5
Nils Barth (inactive)
On 2013/12/18 06:57:45, haraken wrote: > It looks strange that EventHandler and CachedAttribute have to ...
7 years ago (2013-12-19 02:59:48 UTC) #6
haraken
> EventListener* jsValue = > imp->eventHandlerAttribute(isolatedWorldForIsolate(info.GetIsolate())); > v8SetReturnValue(info, jsValue ? > > v8::Handle<v8::Value>(V8AbstractEventListener::cast(jsValue)->getListenerObject(imp->executionContext())) > : ...
7 years ago (2013-12-19 03:11:02 UTC) #7
Nils Barth (inactive)
On 2013/12/19 03:11:02, haraken wrote: > > EventListener* jsValue = > > imp->eventHandlerAttribute(isolatedWorldForIsolate(info.GetIsolate())); > > ...
7 years ago (2013-12-19 08:16:49 UTC) #8
Nils Barth (inactive)
6 years, 9 months ago (2014-03-20 03:42:16 UTC) #9
Ended up being implemented more simply in a later CL:
IDL compiler: [RaisesException] on interface type attributes
https://codereview.chromium.org/131453010/

Simpler implementation was b/c we do need .release() various places, and I'd
added a flag for this, so it was just a matter of setting the flag.

Powered by Google App Engine
This is Rietveld 408576698