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

Issue 2772893002: Experiment with typemaps in Blink Modules

Created:
3 years, 9 months ago by Peter Beverloo
Modified:
3 years, 9 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, blink-reviews, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, haraken, darin (slow to review), harkness+watch_chromium.org, awdf+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Experiment with typemaps in Blink Modules BUG=

Patch Set 1 #

Patch Set 2 : Experiment with typemaps in Blink Modules #

Total comments: 3

Messages

Total messages: 12 (7 generated)
Peter Beverloo
https://codereview.chromium.org/2772893002/diff/20001/third_party/WebKit/Source/modules/background_fetch/BackgroundFetch.typemap File third_party/WebKit/Source/modules/background_fetch/BackgroundFetch.typemap (right): https://codereview.chromium.org/2772893002/diff/20001/third_party/WebKit/Source/modules/background_fetch/BackgroundFetch.typemap#newcode6 third_party/WebKit/Source/modules/background_fetch/BackgroundFetch.typemap:6: public_headers = [ "modules/background_fetch/IconDefinition.h" ] This is a generated ...
3 years, 9 months ago (2017-03-23 19:47:46 UTC) #2
haraken
https://codereview.chromium.org/2772893002/diff/20001/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchTypeConverters.cpp File third_party/WebKit/Source/modules/background_fetch/BackgroundFetchTypeConverters.cpp (right): https://codereview.chromium.org/2772893002/diff/20001/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchTypeConverters.cpp#newcode39 third_party/WebKit/Source/modules/background_fetch/BackgroundFetchTypeConverters.cpp:39: WTF::Vector<blink::IconDefinition> mojoIcons; On 2017/03/23 19:47:46, Peter Beverloo wrote: > ...
3 years, 9 months ago (2017-03-24 02:09:18 UTC) #8
dcheng
On 2017/03/24 02:09:18, haraken wrote: > https://codereview.chromium.org/2772893002/diff/20001/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchTypeConverters.cpp > File > third_party/WebKit/Source/modules/background_fetch/BackgroundFetchTypeConverters.cpp > (right): > > ...
3 years, 9 months ago (2017-03-24 23:11:31 UTC) #9
Peter Beverloo
On 2017/03/24 23:11:31, dcheng wrote: > On 2017/03/24 02:09:18, haraken wrote: > > > https://codereview.chromium.org/2772893002/diff/20001/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchTypeConverters.cpp ...
3 years, 9 months ago (2017-03-24 23:32:03 UTC) #10
haraken
3 years, 9 months ago (2017-03-27 04:55:20 UTC) #12
+oilpan-reviews

>
third_party/WebKit/Source/modules/background_fetch/BackgroundFetchTypeConverters.cpp:39:
> > WTF::Vector<blink::IconDefinition> mojoIcons;
> > On 2017/03/23 19:47:46, Peter Beverloo wrote:
> > > This is where it fails, and it happens in the generated
> > > background_fetch.mojom-blink.cc too. Traced objects, i.e. both
dictionaries
> > and
> > > interfaces, can't be stored in regular WTF::Vectors<> due to the following
> > > static_assert:
> > > 
> > > Vector.h:1273:3: error: static_assert failed "Cannot put
> > > DISALLOW_NEW_EXCEPT_PLACEMENT_NEW objects that have trace methods into an
> > > off-heap Vector"
> > >   static_assert(Allocator::isGarbageCollected ||
> > >   ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > 
> > Can we just use a HeapVector?
> > 
> > Also I think we should just fix the mojo-binding generator to generate a
> > HeapVector when the vector contents are garbage collected objects.
> 
> I think it's a bit tricky for the binding generator to know when the objects
are
> GCed or not.
> 
> I'm curious--can we make Vector's implementation conditional? Why do we need a
> separate HeapVector?

This is an interesting idea. If it's doable, I'm fine with it.

  Vector<Member<OnHeapObject>>
  Vector<CompoundObjectThatHasTraceMethod>

should be automatically treated as an on-heap vector.

Powered by Google App Engine
This is Rietveld 408576698