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

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

Issue 10669031: Support V8EnabledAtRuntime in constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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
« lib/dom/scripts/databasebuilder.py ('K') | « lib/dom/scripts/databasebuilder.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/dom/scripts/systemnative.py
diff --git a/lib/dom/scripts/systemnative.py b/lib/dom/scripts/systemnative.py
index 57f9527d3447ee942253701880c2211293d3b8b6..b53e0086e0812512cdafcea0d67abacfca407a0f 100644
--- a/lib/dom/scripts/systemnative.py
+++ b/lib/dom/scripts/systemnative.py
@@ -315,6 +315,16 @@ class NativeImplementationGenerator(systembase.BaseGenerator):
' }',
FEATURE=self._interface.ext_attrs['synthesizedV8EnabledPerContext'])
+ if 'synthesizedV8EnabledAtRuntime' in self._interface.ext_attrs:
podivilov 2012/06/26 10:51:13 Shouldn't that be elif?
Anton Muhin 2012/06/26 12:16:35 Added assert instead On 2012/06/26 10:51:13, podi
+ raises_exceptions = True
+ self._cpp_impl_includes.add('"RuntimeEnabledFeatures.h"')
+ runtime_check = emitter.Format(
+ ' if (!RuntimeEnabledFeatures::$(FEATURE)Enabled()) {\n'
+ ' exception = Dart_NewString("Feature $FEATURE is not enabled");\n'
+ ' goto fail;\n'
+ ' }',
+ FEATURE=self._interface.ext_attrs['synthesizedV8EnabledAtRuntime'])
+
self._GenerateNativeCallback(callback_name='constructorCallback',
parameter_definitions=parameter_definitions_emitter.Fragments(),
needs_receiver=False, invocation=invocation,
« lib/dom/scripts/databasebuilder.py ('K') | « lib/dom/scripts/databasebuilder.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698