Index: Source/bindings/dart/DartController.cpp |
=================================================================== |
--- Source/bindings/dart/DartController.cpp (revision 166663) |
+++ Source/bindings/dart/DartController.cpp (working copy) |
@@ -358,8 +358,7 @@ |
static void messageNotifyCallback(Dart_Isolate destinationIsolate) |
{ |
- DartIsolateScope scope(destinationIsolate); |
- DartDOMData* domData = DartDOMData::current(); |
+ DartDOMData* domData = static_cast<DartDOMData*>(Dart_IsolateData(destinationIsolate)); |
ASSERT(domData->isDOMEnabled()); |
ExecutionContext* destinationContext = domData->scriptExecutionContext(); |
destinationContext->postTask(adoptPtr(new MessageNotifyTask(domData->threadSafeIsolateWrapper()))); |
@@ -481,10 +480,8 @@ |
static void setDartFlags(const char* str) |
{ |
- const char* disableProfiler = "--no-profile"; |
- |
if (!str) { |
- Dart_SetVMFlags(1, &disableProfiler); |
+ Dart_SetVMFlags(0, 0); |
return; |
} |
@@ -504,7 +501,7 @@ |
} |
// Allocate argument array. |
- const char** argv = new const char*[argc + 1]; |
+ const char** argv = new const char*[argc]; |
// Split the flags string into arguments. |
argc = 0; |
@@ -515,10 +512,9 @@ |
*p++ = '\0'; // 0-terminate argument |
p = skipWhiteSpace(p); |
} |
- argv[argc] = disableProfiler; |
// Set the flags. |
- Dart_SetVMFlags(argc + 1, argv); |
+ Dart_SetVMFlags(argc, argv); |
delete[] argv; |
delete[] copy; |