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

Unified Diff: tools/dom/scripts/systemnative.py

Issue 14211014: Chrome roll. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/systemnative.py
diff --git a/tools/dom/scripts/systemnative.py b/tools/dom/scripts/systemnative.py
index a369a606859f99045aad76048610bb38f9c5fa28..b86e0fe5a44f2722413930587c5ee026f4acf434 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -10,6 +10,7 @@ import emitter
import os
from generator import *
from htmldartgenerator import *
+from idlnode import IDLArgument
from systemhtml import js_support_checks, GetCallbackInfo, HTML_LIBRARY_NAMES
class DartiumBackend(HtmlDartGenerator):
@@ -680,6 +681,7 @@ class DartiumBackend(HtmlDartGenerator):
if requires_stack_info:
self._cpp_impl_includes.add('"ScriptArguments.h"')
+ self._cpp_impl_includes.add('"ScriptCallStack.h"')
body_emitter.Emit(
'\n'
' ScriptState* currentState = ScriptState::current();\n'
@@ -718,9 +720,10 @@ class DartiumBackend(HtmlDartGenerator):
argument_expression_template, type, cls, function = \
type_info.to_native_info(argument, self._interface.id)
- if ((IsOptional(argument) and not self._IsArgumentOptionalInWebCore(node, argument)) or
- (argument.ext_attrs.get('Optional') == 'DefaultIsNullString') or
- _IsOptionalStringArgumentInInitEventMethod(self._interface, node, argument)):
+ if (isinstance(argument, IDLArgument) and (
+ (IsOptional(argument) and not self._IsArgumentOptionalInWebCore(node, argument)) or
+ (argument.ext_attrs.get('Default') == 'NullString') or
+ _IsOptionalStringArgumentInInitEventMethod(self._interface, node, argument))):
function += 'WithNullCheck'
argument_name = DartDomNameOfAttribute(argument)
@@ -922,5 +925,5 @@ def _IsOptionalStringArgumentInInitEventMethod(interface, operation, argument):
return (
interface.id.endswith('Event') and
operation.id.startswith('init') and
- argument.ext_attrs.get('Optional') == 'DefaultIsUndefined' and
+ argument.ext_attrs.get('Default') == 'Undefined' and
argument.type.id == 'DOMString')
« no previous file with comments | « tools/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698