]> khamidou — GitHub mirrors - electron.git/commitdiff
Always enable harmony when node binding is on.
authorCheng Zhao <zcbenz@gmail.com>
Mon, 28 Jul 2014 09:06:28 +0000 (17:06 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 28 Jul 2014 12:28:50 +0000 (20:28 +0800)
If we dont' do this we would have lots of "Extension or internal
compilation error." error, seems to be V8's bug.

atom/renderer/atom_renderer_client.cc

index 8b3aaee517f68a73cc2f3b098366c38521565f0c..7fbc918266070065cd51e3770642b45af61c94d5 100644 (file)
@@ -70,6 +70,10 @@ AtomRendererClient::AtomRendererClient()
     node_integration_ = ALL;
 
   if (IsNodeBindingEnabled()) {
+    // Always enable harmony when node binding is on.
+    std::string flags("--harmony");
+    v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size()));
+
     node_bindings_.reset(NodeBindings::Create(false));
     atom_bindings_.reset(new AtomRendererBindings);
   }