[Win] Build fix for generated inspector files.
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Oct 2014 20:17:43 +0000 (20:17 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Oct 2014 20:17:43 +0000 (20:17 +0000)
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-10-20
Rubberstamped by Brent Fulgham.

* inspector/scripts/codegen/generate_backend_dispatcher_header.py:
(BackendDispatcherHeaderGenerator._generate_async_handler_declaration_for_command):
* inspector/scripts/codegen/generator_templates.py:
(GeneratorTemplates):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174904 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_dispatcher_header.py
Source/JavaScriptCore/inspector/scripts/codegen/generator_templates.py

index 598fe96..7e9685f 100644 (file)
@@ -1,3 +1,14 @@
+2014-10-20  Joseph Pecoraro  <pecoraro@apple.com>
+
+        [Win] Build fix for generated inspector files.
+
+        Rubberstamped by Brent Fulgham.
+
+        * inspector/scripts/codegen/generate_backend_dispatcher_header.py:
+        (BackendDispatcherHeaderGenerator._generate_async_handler_declaration_for_command):
+        * inspector/scripts/codegen/generator_templates.py:
+        (GeneratorTemplates):
+
 2014-10-20  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Unreviewed build fix.
index d8de14a..b2fb06c 100755 (executable)
@@ -148,7 +148,13 @@ class BackendDispatcherHeaderGenerator(Generator):
         for _parameter in command.return_parameters:
             out_parameters.append("%s %s" % (Generator.type_string_for_formal_async_parameter(_parameter), _parameter.parameter_name))
 
+        class_components = ['class']
+        export_macro = self.model().framework.setting('export_macro', None)
+        if export_macro:
+            class_components.append(export_macro)
+
         command_args = {
+            'classAndExportMacro': ' '.join(class_components),
             'callbackName': callbackName,
             'commandName': command.command_name,
             'inParameters': ", ".join(in_parameters),
index 843a492..760cbb0 100755 (executable)
@@ -31,7 +31,6 @@
 class GeneratorTemplates:
     CopyrightBlock = (
     """/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
  * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
  * Copyright (C) 2014 University of Washington. All rights reserved.
  *
@@ -115,7 +114,7 @@ private:
 };""")
 
     BackendDispatcherHeaderAsyncCommandDeclaration = (
-    """    class ${callbackName} : public Inspector::InspectorBackendDispatcher::CallbackBase {
+    """    ${classAndExportMacro} ${callbackName} : public Inspector::InspectorBackendDispatcher::CallbackBase {
     public:
         ${callbackName}(PassRefPtr<Inspector::InspectorBackendDispatcher>, int id);
         void sendSuccess(${outParameters});