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

Issue 224993003: Refactor the class id generation code a bit to make it possible to have toActiveDOMObject, ToEventT… (Closed)

Created:
6 years, 8 months ago by siva
Modified:
6 years, 8 months ago
Reviewers:
vsm, terry, rmacnak
CC:
reviews_dartlang.org, ricow1
Visibility:
Public.

Description

Refactor the class id generation code a bit to make it possible to have toActiveDOMObject, ToEventTarget and toNode functions for each webkit type. R=rmacnak@google.com Committed: https://code.google.com/p/dart/source/detail?r=34840

Patch Set 1 #

Patch Set 2 : #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -54 lines) Patch
M tools/dom/scripts/systemnative.py View 1 8 chunks +131 lines, -44 lines 6 comments Download
M tools/dom/templates/html/dartium/cpp_header.template View 1 3 chunks +25 lines, -6 lines 2 comments Download
M tools/dom/templates/html/dartium/cpp_implementation.template View 1 chunk +1 line, -4 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
siva
6 years, 8 months ago (2014-04-04 15:48:02 UTC) #1
siva
6 years, 8 months ago (2014-04-05 00:07:49 UTC) #2
rmacnak
lgtm
6 years, 8 months ago (2014-04-05 00:37:31 UTC) #3
siva
Committed patchset #2 manually as r34840 (presubmit successful).
6 years, 8 months ago (2014-04-08 20:28:02 UTC) #4
vsm
lgtm https://codereview.chromium.org/224993003/diff/20001/tools/dom/scripts/systemnative.py File tools/dom/scripts/systemnative.py (right): https://codereview.chromium.org/224993003/diff/20001/tools/dom/scripts/systemnative.py#newcode628 tools/dom/scripts/systemnative.py:628: else: Should these generate code to assert unreachable ...
6 years, 8 months ago (2014-04-08 20:29:27 UTC) #5
siva
6 years, 8 months ago (2014-04-08 23:09:03 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/224993003/diff/20001/tools/dom/scripts/system...
File tools/dom/scripts/systemnative.py (right):

https://codereview.chromium.org/224993003/diff/20001/tools/dom/scripts/system...
tools/dom/scripts/systemnative.py:628: else:
When iterating over the weak handles we would use the return 0 to ensure that we
don't try to process something that is not a Node for instance. You will see the
code in my next CL.

On 2014/04/08 20:29:27, vsm wrote:
> Should these generate code to assert unreachable in the else cases?

https://codereview.chromium.org/224993003/diff/20001/tools/dom/scripts/system...
tools/dom/scripts/systemnative.py:1449: is_event_target_test = lambda interface:
'EventTarget' in interface.ext_attrs
I will fix this and another use of is_event_target below in a new CL.


On 2014/04/08 20:29:27, vsm wrote:
> This may need to be lambda interface: interface.id == 'EventTarget'.  Not
> positive, but I don't think it's an attribute any more.

https://codereview.chromium.org/224993003/diff/20001/tools/dom/scripts/system...
tools/dom/scripts/systemnative.py:1526: e.Emit('ActiveDOMObject*
toNullActiveDOMObject(void* value) { return 0; }\n');
Yes they would be used to trigger processing in the GC prologue code.

On 2014/04/08 20:29:27, vsm wrote:
> Ditto on ASSERTs here - will these ever be called?

https://codereview.chromium.org/224993003/diff/20001/tools/dom/templates/html...
File tools/dom/templates/html/dartium/cpp_header.template (right):

https://codereview.chromium.org/224993003/diff/20001/tools/dom/templates/html...
tools/dom/templates/html/dartium/cpp_header.template:27: static ActiveDOMObject*
toActiveDOMObject(void* value)
I don't yet have the GC prolog code done yet. You will see in that code that we
use these methods to figure out if an object needs to be processed as a Node,
Event target or an Active object.

On 2014/04/08 20:29:27, vsm wrote:
> if HasConverters is false for the type, should these be suppressed altogether?

> it looks like they are never referenced in that case.

Powered by Google App Engine
This is Rietveld 408576698