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

Unified Diff: Source/bindings/dart/DartController.cpp

Issue 155503003: Fix for bug 16534 do not Enter the same isolate on two different threads. (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/1700/
Patch Set: Created 6 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698