OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stdio.h> | 5 #include <stdio.h> |
6 | 6 |
7 #include "base/i18n/icu_util.h" | 7 #include "base/i18n/icu_util.h" |
8 #include "dart/runtime/include/dart_api.h" | 8 #include "dart/runtime/include/dart_api.h" |
9 #include "mojo/dart/embedder/builtin.h" | 9 #include "mojo/dart/embedder/builtin.h" |
10 #include "mojo/dart/embedder/mojo_natives.h" | 10 #include "mojo/dart/embedder/mojo_natives.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 "/core/data_pipe_patch.dart", | 40 "/core/data_pipe_patch.dart", |
41 "/core/handle_patch.dart", | 41 "/core/handle_patch.dart", |
42 "/core/handle_watcher_patch.dart", | 42 "/core/handle_watcher_patch.dart", |
43 "/core/message_pipe_patch.dart", | 43 "/core/message_pipe_patch.dart", |
44 NULL, | 44 NULL, |
45 }; | 45 }; |
46 | 46 |
47 Builtin::builtin_lib_props Builtin::builtin_libraries_[] = { | 47 Builtin::builtin_lib_props Builtin::builtin_libraries_[] = { |
48 /* { url_, has_natives_, native_symbol_, native_resolver_, | 48 /* { url_, has_natives_, native_symbol_, native_resolver_, |
49 patch_url_, patch_paths_ } */ | 49 patch_url_, patch_paths_ } */ |
50 {"dart:mojo_builtin", true, Builtin::NativeSymbol, Builtin::NativeLookup, | 50 {"mojo:builtin", true, Builtin::NativeSymbol, Builtin::NativeLookup, |
51 nullptr, nullptr }, | 51 nullptr, nullptr }, |
52 {"dart:mojo_bindings", false, nullptr, nullptr, | 52 {"mojo:bindings", false, nullptr, nullptr, |
53 nullptr, nullptr }, | 53 nullptr, nullptr }, |
54 {"dart:mojo_core", true, MojoNativeSymbol, MojoNativeLookup, | 54 {"mojo:core", true, MojoNativeSymbol, MojoNativeLookup, |
55 "dart:mojo_core-patch", mojo_core_patch_resource_names_ }, | 55 "mojo:core-patch", mojo_core_patch_resource_names_ }, |
56 }; | 56 }; |
57 | 57 |
58 uint8_t Builtin::snapshot_magic_number[] = {0xf5, 0xf5, 0xdc, 0xdc}; | 58 uint8_t Builtin::snapshot_magic_number[] = {0xf5, 0xf5, 0xdc, 0xdc}; |
59 | 59 |
60 Dart_Handle Builtin::NewError(const char* format, ...) { | 60 Dart_Handle Builtin::NewError(const char* format, ...) { |
61 va_list args; | 61 va_list args; |
62 va_start(args, format); | 62 va_start(args, format); |
63 intptr_t len = vsnprintf(nullptr, 0, format, args); | 63 intptr_t len = vsnprintf(nullptr, 0, format, args); |
64 va_end(args); | 64 va_end(args); |
65 | 65 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 if (builtin_libraries_[id].patch_url_ != nullptr) { | 124 if (builtin_libraries_[id].patch_url_ != nullptr) { |
125 DCHECK(builtin_libraries_[id].patch_resources_ != nullptr); | 125 DCHECK(builtin_libraries_[id].patch_resources_ != nullptr); |
126 LoadPatchFiles(library, | 126 LoadPatchFiles(library, |
127 builtin_libraries_[id].patch_url_, | 127 builtin_libraries_[id].patch_url_, |
128 builtin_libraries_[id].patch_resources_); | 128 builtin_libraries_[id].patch_resources_); |
129 } | 129 } |
130 } | 130 } |
131 | 131 |
132 } // namespace dart | 132 } // namespace dart |
133 } // namespace mojo | 133 } // namespace mojo |
OLD | NEW |