mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Update Dart dependency and patch dart_controller to account for non-backwards compatible API update
Patch originally by chinmaygarde. R=chinmaygarde@google.com Review URL: https://codereview.chromium.org/1185233002.
This commit is contained in:
parent
2b4cf61644
commit
883f673a6b
@ -238,17 +238,15 @@ static void EnsureHandleWatcherStarted() {
|
||||
static Dart_Isolate IsolateCreateCallback(const char* script_uri,
|
||||
const char* main,
|
||||
const char* package_root,
|
||||
Dart_IsolateFlags* flags,
|
||||
void* callback_data,
|
||||
char** error) {
|
||||
|
||||
if (IsServiceIsolateURL(script_uri)) {
|
||||
CHECK(kDartIsolateSnapshotBuffer);
|
||||
DartState* dart_state = new DartState();
|
||||
Dart_Isolate isolate = Dart_CreateIsolate(script_uri,
|
||||
"main",
|
||||
kDartIsolateSnapshotBuffer,
|
||||
nullptr,
|
||||
error);
|
||||
Dart_Isolate isolate =
|
||||
Dart_CreateIsolate(script_uri, "main", kDartIsolateSnapshotBuffer,
|
||||
nullptr, nullptr, error);
|
||||
CHECK(isolate) << error;
|
||||
dart_state->SetIsolate(isolate);
|
||||
CHECK(Dart_IsServiceIsolate(isolate));
|
||||
@ -277,8 +275,9 @@ static Dart_Isolate IsolateCreateCallback(const char* script_uri,
|
||||
// Create & start the handle watcher isolate
|
||||
CHECK(kDartIsolateSnapshotBuffer);
|
||||
DartState* dart_state = new DartState();
|
||||
Dart_Isolate isolate = Dart_CreateIsolate("sky:handle_watcher", "",
|
||||
kDartIsolateSnapshotBuffer, dart_state, error);
|
||||
Dart_Isolate isolate =
|
||||
Dart_CreateIsolate("sky:handle_watcher", "", kDartIsolateSnapshotBuffer,
|
||||
nullptr, dart_state, error);
|
||||
CHECK(isolate) << error;
|
||||
dart_state->SetIsolate(isolate);
|
||||
|
||||
@ -324,7 +323,7 @@ void DartController::CreateIsolateFor(PassOwnPtr<DOMDartState> state) {
|
||||
dom_dart_state_ = state;
|
||||
Dart_Isolate isolate = Dart_CreateIsolate(
|
||||
dom_dart_state_->url().string().utf8().data(), "main",
|
||||
kDartIsolateSnapshotBuffer,
|
||||
kDartIsolateSnapshotBuffer, nullptr,
|
||||
static_cast<DartState*>(dom_dart_state_.get()), &error);
|
||||
Dart_SetMessageNotifyCallback(MessageNotifyCallback);
|
||||
CHECK(isolate) << error;
|
||||
|
||||
@ -18,21 +18,17 @@ void InitDartVM() {
|
||||
const char** argv = nullptr;
|
||||
|
||||
CHECK(Dart_SetVMFlags(argc, argv));
|
||||
CHECK(Dart_Initialize(blink::kDartVmIsolateSnapshotBuffer,
|
||||
nullptr, // Isolate created callback.
|
||||
nullptr, // Isolate interrupt callback.
|
||||
nullptr, // Unhandled exception callback.
|
||||
nullptr, // Isolate shutdown callback.
|
||||
// File IO callbacks.
|
||||
nullptr, nullptr, nullptr, nullptr, nullptr));
|
||||
CHECK(Dart_Initialize(blink::kDartVmIsolateSnapshotBuffer, nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||
nullptr));
|
||||
}
|
||||
|
||||
Dart_Isolate CreateDartIsolate() {
|
||||
CHECK(blink::kDartIsolateSnapshotBuffer);
|
||||
char* error = nullptr;
|
||||
Dart_Isolate isolate =
|
||||
Dart_CreateIsolate("http://example.com", "main",
|
||||
blink::kDartIsolateSnapshotBuffer, nullptr, &error);
|
||||
Dart_Isolate isolate = Dart_CreateIsolate("http://example.com", "main",
|
||||
blink::kDartIsolateSnapshotBuffer,
|
||||
nullptr, nullptr, &error);
|
||||
|
||||
CHECK(isolate) << error;
|
||||
CHECK(!LogIfError(Dart_SetLibraryTagHandler(HandleLibraryTag)));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user