| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3725d4c commit 11566fe
20 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | 28 | # Reset this number to 0 on major V8 upgrades. | |
| 29 | 29 | # Increment by one for each non-official patch applied to deps/v8. | |
| 30 | - 'v8_embedder_string': '-node.18', | ||
| 30 | + 'v8_embedder_string': '-node.19', | ||
| 31 | 31 | ||
| 32 | 32 | # Enable disassembler for `--print-code` v8 options | |
| 33 | 33 | 'v8_enable_disassembler': 1, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -104,6 +104,7 @@ class String; | |||
| 104 | 104 | class StringObject; | |
| 105 | 105 | class Symbol; | |
| 106 | 106 | class SymbolObject; | |
| 107 | + class PrimitiveArray; | ||
| 107 | 108 | class Private; | |
| 108 | 109 | class Uint32; | |
| 109 | 110 | class Utils; | |
@@ -978,6 +979,48 @@ class V8_EXPORT Data { | |||
| 978 | 979 | Data(); | |
| 979 | 980 | }; | |
| 980 | 981 | ||
| 982 | + /** | ||
| 983 | + * This is an unfinished experimental feature, and is only exposed | ||
| 984 | + * here for internal testing purposes. DO NOT USE. | ||
| 985 | + * | ||
| 986 | + * A container type that holds relevant metadata for module loading. | ||
| 987 | + * | ||
| 988 | + * This is passed back to the embedder as part of | ||
| 989 | + * HostImportDynamicallyCallback for module loading. | ||
| 990 | + */ | ||
| 991 | + class V8_EXPORT ScriptOrModule { | ||
| 992 | + public: | ||
| 993 | + /** | ||
| 994 | + * The name that was passed by the embedder as ResourceName to the | ||
| 995 | + * ScriptOrigin. This can be either a v8::String or v8::Undefined. | ||
| 996 | + */ | ||
| 997 | + Local<Value> GetResourceName(); | ||
| 998 | + | ||
| 999 | + /** | ||
| 1000 | + * The options that were passed by the embedder as HostDefinedOptions to | ||
| 1001 | + * the ScriptOrigin. | ||
| 1002 | + */ | ||
| 1003 | + Local<PrimitiveArray> GetHostDefinedOptions(); | ||
| 1004 | + }; | ||
| 1005 | + | ||
| 1006 | + /** | ||
| 1007 | + * This is an unfinished experimental feature, and is only exposed | ||
| 1008 | + * here for internal testing purposes. DO NOT USE. | ||
| 1009 | + * | ||
| 1010 | + * An array to hold Primitive values. This is used by the embedder to | ||
| 1011 | + * pass host defined options to the ScriptOptions during compilation. | ||
| 1012 | + * | ||
| 1013 | + * This is passed back to the embedder as part of | ||
| 1014 | + * HostImportDynamicallyCallback for module loading. | ||
| 1015 | + * | ||
| 1016 | + */ | ||
| 1017 | + class V8_EXPORT PrimitiveArray { | ||
| 1018 | + public: | ||
| 1019 | + static Local<PrimitiveArray> New(Isolate* isolate, int length); | ||
| 1020 | + int Length() const; | ||
| 1021 | + void Set(int index, Local<Primitive> item); | ||
| 1022 | + Local<Primitive> Get(int index); | ||
| 1023 | + }; | ||
| 981 | 1024 | ||
| 982 | 1025 | /** | |
| 983 | 1026 | * The optional attributes of ScriptOrigin. | |
@@ -1027,13 +1070,17 @@ class ScriptOrigin { | |||
| 1027 | 1070 | Local<Value> source_map_url = Local<Value>(), | |
| 1028 | 1071 | Local<Boolean> resource_is_opaque = Local<Boolean>(), | |
| 1029 | 1072 | Local<Boolean> is_wasm = Local<Boolean>(), | |
| 1030 | - Local<Boolean> is_module = Local<Boolean>()); | ||
| 1073 | + Local<Boolean> is_module = Local<Boolean>() /*, | ||
| 1074 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 1075 | + Local<PrimitiveArray> host_defined_options = Local<PrimitiveArray>() */); | ||
| 1031 | 1076 | ||
| 1032 | 1077 | V8_INLINE Local<Value> ResourceName() const; | |
| 1033 | 1078 | V8_INLINE Local<Integer> ResourceLineOffset() const; | |
| 1034 | 1079 | V8_INLINE Local<Integer> ResourceColumnOffset() const; | |
| 1035 | 1080 | V8_INLINE Local<Integer> ScriptID() const; | |
| 1036 | 1081 | V8_INLINE Local<Value> SourceMapUrl() const; | |
| 1082 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 1083 | + // V8_INLINE Local<PrimitiveArray> HostDefinedOptions() const; | ||
| 1037 | 1084 | V8_INLINE ScriptOriginOptions Options() const { return options_; } | |
| 1038 | 1085 | ||
| 1039 | 1086 | private: | |
@@ -1043,6 +1090,8 @@ class ScriptOrigin { | |||
| 1043 | 1090 | ScriptOriginOptions options_; | |
| 1044 | 1091 | Local<Integer> script_id_; | |
| 1045 | 1092 | Local<Value> source_map_url_; | |
| 1093 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 1094 | + // Local<PrimitiveArray> host_defined_options_; | ||
| 1046 | 1095 | }; | |
| 1047 | 1096 | ||
| 1048 | 1097 | /** | |
@@ -1289,6 +1338,7 @@ class V8_EXPORT ScriptCompiler { | |||
| 1289 | 1338 | Local<Integer> resource_column_offset; | |
| 1290 | 1339 | ScriptOriginOptions resource_options; | |
| 1291 | 1340 | Local<Value> source_map_url; | |
| 1341 | + // Local<PrimitiveArray> host_defined_options; | ||
| 1292 | 1342 | ||
| 1293 | 1343 | // Cached data from previous compilation (if a kConsume*Cache flag is | |
| 1294 | 1344 | // set), or hold newly generated cache data (kProduce*Cache flags) are | |
@@ -6209,8 +6259,8 @@ typedef void (*DeprecatedCallCompletedCallback)(); | |||
| 6209 | 6259 | * embedder to load a module. This is used as part of the dynamic | |
| 6210 | 6260 | * import syntax. | |
| 6211 | 6261 | * | |
| 6212 | - * The referrer is the name of the file which calls the dynamic | ||
| 6213 | - * import. The referrer can be used to resolve the module location. | ||
| 6262 | + * The referrer contains metadata about the script/module that calls | ||
| 6263 | + * import. | ||
| 6214 | 6264 | * | |
| 6215 | 6265 | * The specifier is the name of the module that should be imported. | |
| 6216 | 6266 | * | |
@@ -6225,7 +6275,8 @@ typedef void (*DeprecatedCallCompletedCallback)(); | |||
| 6225 | 6275 | * that exception by returning an empty MaybeLocal. | |
| 6226 | 6276 | */ | |
| 6227 | 6277 | typedef MaybeLocal<Promise> (*HostImportModuleDynamicallyCallback)( | |
| 6228 | - Local<Context> context, Local<String> referrer, Local<String> specifier); | ||
| 6278 | + Local<Context> context, Local<ScriptOrModule> referrer, | ||
| 6279 | + Local<String> specifier); | ||
| 6229 | 6280 | ||
| 6230 | 6281 | /** | |
| 6231 | 6282 | * PromiseHook with type kInit is called when a new promise is | |
@@ -9545,7 +9596,9 @@ ScriptOrigin::ScriptOrigin(Local<Value> resource_name, | |||
| 9545 | 9596 | Local<Integer> script_id, | |
| 9546 | 9597 | Local<Value> source_map_url, | |
| 9547 | 9598 | Local<Boolean> resource_is_opaque, | |
| 9548 | - Local<Boolean> is_wasm, Local<Boolean> is_module) | ||
| 9599 | + Local<Boolean> is_wasm, Local<Boolean> is_module /*, | ||
| 9600 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 9601 | + Local<PrimitiveArray> host_defined_options */) | ||
| 9549 | 9602 | : resource_name_(resource_name), | |
| 9550 | 9603 | resource_line_offset_(resource_line_offset), | |
| 9551 | 9604 | resource_column_offset_(resource_column_offset), | |
@@ -9555,10 +9608,16 @@ ScriptOrigin::ScriptOrigin(Local<Value> resource_name, | |||
| 9555 | 9608 | !is_wasm.IsEmpty() && is_wasm->IsTrue(), | |
| 9556 | 9609 | !is_module.IsEmpty() && is_module->IsTrue()), | |
| 9557 | 9610 | script_id_(script_id), | |
| 9558 | - source_map_url_(source_map_url) {} | ||
| 9611 | + source_map_url_(source_map_url) /*, | ||
| 9612 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 9613 | + host_defined_options_(host_defined_options) */ {} | ||
| 9559 | 9614 | ||
| 9560 | 9615 | Local<Value> ScriptOrigin::ResourceName() const { return resource_name_; } | |
| 9561 | 9616 | ||
| 9617 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 9618 | + // Local<PrimitiveArray> ScriptOrigin::HostDefinedOptions() const { | ||
| 9619 | + // return host_defined_options_; | ||
| 9620 | + // } | ||
| 9562 | 9621 | ||
| 9563 | 9622 | Local<Integer> ScriptOrigin::ResourceLineOffset() const { | |
| 9564 | 9623 | return resource_line_offset_; | |
@@ -9575,7 +9634,6 @@ Local<Integer> ScriptOrigin::ScriptID() const { return script_id_; } | |||
| 9575 | 9634 | ||
| 9576 | 9635 | Local<Value> ScriptOrigin::SourceMapUrl() const { return source_map_url_; } | |
| 9577 | 9636 | ||
| 9578 | - | ||
| 9579 | 9637 | ScriptCompiler::Source::Source(Local<String> string, const ScriptOrigin& origin, | |
| 9580 | 9638 | CachedData* data) | |
| 9581 | 9639 | : source_string(string), | |
@@ -9584,9 +9642,10 @@ ScriptCompiler::Source::Source(Local<String> string, const ScriptOrigin& origin, | |||
| 9584 | 9642 | resource_column_offset(origin.ResourceColumnOffset()), | |
| 9585 | 9643 | resource_options(origin.Options()), | |
| 9586 | 9644 | source_map_url(origin.SourceMapUrl()), | |
| 9645 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 9646 | + // host_defined_options(origin.HostDefinedOptions()), | ||
| 9587 | 9647 | cached_data(data) {} | |
| 9588 | 9648 | ||
| 9589 | - | ||
| 9590 | 9649 | ScriptCompiler::Source::Source(Local<String> string, | |
| 9591 | 9650 | CachedData* data) | |
| 9592 | 9651 | : source_string(string), cached_data(data) {} | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -278,6 +278,9 @@ static ScriptOrigin GetScriptOriginForScript(i::Isolate* isolate, | |||
| 278 | 278 | i::Handle<i::Script> script) { | |
| 279 | 279 | i::Handle<i::Object> scriptName(script->GetNameOrSourceURL(), isolate); | |
| 280 | 280 | i::Handle<i::Object> source_map_url(script->source_mapping_url(), isolate); | |
| 281 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 282 | + // i::Handle<i::FixedArray> host_defined_options(script->host_defined_options(), | ||
| 283 | + // isolate); | ||
| 281 | 284 | v8::Isolate* v8_isolate = | |
| 282 | 285 | reinterpret_cast<v8::Isolate*>(script->GetIsolate()); | |
| 283 | 286 | ScriptOriginOptions options(script->origin_options()); | |
@@ -290,7 +293,9 @@ static ScriptOrigin GetScriptOriginForScript(i::Isolate* isolate, | |||
| 290 | 293 | Utils::ToLocal(source_map_url), | |
| 291 | 294 | v8::Boolean::New(v8_isolate, options.IsOpaque()), | |
| 292 | 295 | v8::Boolean::New(v8_isolate, script->type() == i::Script::TYPE_WASM), | |
| 293 | - v8::Boolean::New(v8_isolate, options.IsModule())); | ||
| 296 | + v8::Boolean::New(v8_isolate, options.IsModule()) /*, | ||
| 297 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 298 | + Utils::ToLocal(host_defined_options) */); | ||
| 294 | 299 | return origin; | |
| 295 | 300 | } | |
| 296 | 301 | ||
@@ -2082,13 +2087,70 @@ Local<Value> Script::Run() { | |||
| 2082 | 2087 | RETURN_TO_LOCAL_UNCHECKED(Run(context), Value); | |
| 2083 | 2088 | } | |
| 2084 | 2089 | ||
| 2090 | + Local<Value> ScriptOrModule::GetResourceName() { | ||
| 2091 | + i::Handle<i::Script> obj = Utils::OpenHandle(this); | ||
| 2092 | + i::Isolate* isolate = obj->GetIsolate(); | ||
| 2093 | + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); | ||
| 2094 | + i::Handle<i::Object> val(obj->name(), isolate); | ||
| 2095 | + return ToApiHandle<Value>(val); | ||
| 2096 | + } | ||
| 2097 | + | ||
| 2098 | + Local<PrimitiveArray> ScriptOrModule::GetHostDefinedOptions() { | ||
| 2099 | + i::Handle<i::Script> obj = Utils::OpenHandle(this); | ||
| 2100 | + i::Isolate* isolate = obj->GetIsolate(); | ||
| 2101 | + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); | ||
| 2102 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 2103 | + // i::Handle<i::FixedArray> val(obj->host_defined_options(), isolate); | ||
| 2104 | + // return ToApiHandle<PrimitiveArray>(val); | ||
| 2105 | + return Local<PrimitiveArray>(); | ||
| 2106 | + } | ||
| 2085 | 2107 | ||
| 2086 | 2108 | Local<UnboundScript> Script::GetUnboundScript() { | |
| 2087 | 2109 | i::Handle<i::Object> obj = Utils::OpenHandle(this); | |
| 2088 | 2110 | return ToApiHandle<UnboundScript>( | |
| 2089 | 2111 | i::Handle<i::SharedFunctionInfo>(i::JSFunction::cast(*obj)->shared())); | |
| 2090 | 2112 | } | |
| 2091 | 2113 | ||
| 2114 | + // static | ||
| 2115 | + Local<PrimitiveArray> PrimitiveArray::New(Isolate* v8_isolate, int length) { | ||
| 2116 | + i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); | ||
| 2117 | + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); | ||
| 2118 | + Utils::ApiCheck(length >= 0, "v8::PrimitiveArray::New", | ||
| 2119 | + "length must be equal or greater than zero"); | ||
| 2120 | + i::Handle<i::FixedArray> array = isolate->factory()->NewFixedArray(length); | ||
| 2121 | + return ToApiHandle<PrimitiveArray>(array); | ||
| 2122 | + } | ||
| 2123 | + | ||
| 2124 | + int PrimitiveArray::Length() const { | ||
| 2125 | + i::Handle<i::FixedArray> array = Utils::OpenHandle(this); | ||
| 2126 | + i::Isolate* isolate = array->GetIsolate(); | ||
| 2127 | + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); | ||
| 2128 | + return array->length(); | ||
| 2129 | + } | ||
| 2130 | + | ||
| 2131 | + void PrimitiveArray::Set(int index, Local<Primitive> item) { | ||
| 2132 | + i::Handle<i::FixedArray> array = Utils::OpenHandle(this); | ||
| 2133 | + i::Isolate* isolate = array->GetIsolate(); | ||
| 2134 | + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); | ||
| 2135 | + Utils::ApiCheck(index >= 0 && index < array->length(), | ||
| 2136 | + "v8::PrimitiveArray::Set", | ||
| 2137 | + "index must be greater than or equal to 0 and less than the " | ||
| 2138 | + "array length"); | ||
| 2139 | + i::Handle<i::Object> i_item = Utils::OpenHandle(*item); | ||
| 2140 | + array->set(index, *i_item); | ||
| 2141 | + } | ||
| 2142 | + | ||
| 2143 | + Local<Primitive> PrimitiveArray::Get(int index) { | ||
| 2144 | + i::Handle<i::FixedArray> array = Utils::OpenHandle(this); | ||
| 2145 | + i::Isolate* isolate = array->GetIsolate(); | ||
| 2146 | + ENTER_V8_NO_SCRIPT_NO_EXCEPTION(isolate); | ||
| 2147 | + Utils::ApiCheck(index >= 0 && index < array->length(), | ||
| 2148 | + "v8::PrimitiveArray::Get", | ||
| 2149 | + "index must be greater than or equal to 0 and less than the " | ||
| 2150 | + "array length"); | ||
| 2151 | + i::Handle<i::Object> i_item(array->get(index), isolate); | ||
| 2152 | + return ToApiHandle<Primitive>(i_item); | ||
| 2153 | + } | ||
| 2092 | 2154 | ||
| 2093 | 2155 | Module::Status Module::GetStatus() const { | |
| 2094 | 2156 | i::Handle<i::Module> self = Utils::OpenHandle(this); | |
@@ -2225,11 +2287,18 @@ MaybeLocal<UnboundScript> ScriptCompiler::CompileUnboundInternal( | |||
| 2225 | 2287 | TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileScript"); | |
| 2226 | 2288 | i::Handle<i::Object> name_obj; | |
| 2227 | 2289 | i::Handle<i::Object> source_map_url; | |
| 2290 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 2291 | + // i::Handle<i::FixedArray> host_defined_options = | ||
| 2292 | + // isolate->factory()->empty_fixed_array(); | ||
| 2228 | 2293 | int line_offset = 0; | |
| 2229 | 2294 | int column_offset = 0; | |
| 2230 | 2295 | if (!source->resource_name.IsEmpty()) { | |
| 2231 | 2296 | name_obj = Utils::OpenHandle(*(source->resource_name)); | |
| 2232 | 2297 | } | |
| 2298 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 2299 | + // if (!source->host_defined_options.IsEmpty()) { | ||
| 2300 | + // host_defined_options = Utils::OpenHandle(*(source->host_defined_options)); | ||
| 2301 | + // } | ||
| 2233 | 2302 | if (!source->resource_line_offset.IsEmpty()) { | |
| 2234 | 2303 | line_offset = static_cast<int>(source->resource_line_offset->Value()); | |
| 2235 | 2304 | } | |
@@ -2243,7 +2312,7 @@ MaybeLocal<UnboundScript> ScriptCompiler::CompileUnboundInternal( | |||
| 2243 | 2312 | result = i::Compiler::GetSharedFunctionInfoForScript( | |
| 2244 | 2313 | str, name_obj, line_offset, column_offset, source->resource_options, | |
| 2245 | 2314 | source_map_url, isolate->native_context(), NULL, &script_data, options, | |
| 2246 | - i::NOT_NATIVES_CODE); | ||
| 2315 | + i::NOT_NATIVES_CODE /*, host_defined_options */); | ||
| 2247 | 2316 | has_pending_exception = result.is_null(); | |
| 2248 | 2317 | if (has_pending_exception && script_data != NULL) { | |
| 2249 | 2318 | // This case won't happen during normal operation; we have compiled | |
@@ -2508,6 +2577,10 @@ MaybeLocal<Script> ScriptCompiler::Compile(Local<Context> context, | |||
| 2508 | 2577 | if (!origin.ResourceName().IsEmpty()) { | |
| 2509 | 2578 | script->set_name(*Utils::OpenHandle(*(origin.ResourceName()))); | |
| 2510 | 2579 | } | |
| 2580 | + // if (!origin.HostDefinedOptions().IsEmpty()) { | ||
| 2581 | + // script->set_host_defined_options( | ||
| 2582 | + // *Utils::OpenHandle(*(origin.HostDefinedOptions()))); | ||
| 2583 | + // } | ||
| 2511 | 2584 | if (!origin.ResourceLineOffset().IsEmpty()) { | |
| 2512 | 2585 | script->set_line_offset( | |
| 2513 | 2586 | static_cast<int>(origin.ResourceLineOffset()->Value())); | |
@@ -9828,7 +9901,9 @@ MaybeLocal<UnboundScript> debug::CompileInspectorScript(Isolate* v8_isolate, | |||
| 9828 | 9901 | i::Handle<i::Object>(), isolate->native_context(), NULL, &script_data, | |
| 9829 | 9902 | ScriptCompiler::kNoCompileOptions, | |
| 9830 | 9903 | i::FLAG_expose_inspector_scripts ? i::NOT_NATIVES_CODE | |
| 9831 | - : i::INSPECTOR_CODE); | ||
| 9904 | + : i::INSPECTOR_CODE /*, | ||
| 9905 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 9906 | + i::Handle<i::FixedArray>() */); | ||
| 9832 | 9907 | has_pending_exception = result.is_null(); | |
| 9833 | 9908 | RETURN_ON_FAILED_EXECUTION(UnboundScript); | |
| 9834 | 9909 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -111,7 +111,10 @@ class RegisteredExtension { | |||
| 111 | 111 | V(NativeWeakMap, JSWeakMap) \ | |
| 112 | 112 | V(debug::GeneratorObject, JSGeneratorObject) \ | |
| 113 | 113 | V(debug::Script, Script) \ | |
| 114 | - V(Promise, JSPromise) | ||
| 114 | + V(Promise, JSPromise) \ | ||
| 115 | + V(Primitive, Object) \ | ||
| 116 | + V(PrimitiveArray, FixedArray) \ | ||
| 117 | + V(ScriptOrModule, Script) | ||
| 115 | 118 | ||
| 116 | 119 | class Utils { | |
| 117 | 120 | public: | |
@@ -209,6 +212,12 @@ class Utils { | |||
| 209 | 212 | v8::internal::Handle<v8::internal::JSWeakMap> obj); | |
| 210 | 213 | static inline Local<Function> CallableToLocal( | |
| 211 | 214 | v8::internal::Handle<v8::internal::JSReceiver> obj); | |
| 215 | + static inline Local<Primitive> ToLocalPrimitive( | ||
| 216 | + v8::internal::Handle<v8::internal::Object> obj); | ||
| 217 | + static inline Local<PrimitiveArray> ToLocal( | ||
| 218 | + v8::internal::Handle<v8::internal::FixedArray> obj); | ||
| 219 | + static inline Local<ScriptOrModule> ScriptOrModuleToLocal( | ||
| 220 | + v8::internal::Handle<v8::internal::Script> obj); | ||
| 212 | 221 | ||
| 213 | 222 | #define DECLARE_OPEN_HANDLE(From, To) \ | |
| 214 | 223 | static inline v8::internal::Handle<v8::internal::To> \ | |
@@ -325,6 +334,9 @@ MAKE_TO_LOCAL(Uint32ToLocal, Object, Uint32) | |||
| 325 | 334 | MAKE_TO_LOCAL(ExternalToLocal, JSObject, External) | |
| 326 | 335 | MAKE_TO_LOCAL(NativeWeakMapToLocal, JSWeakMap, NativeWeakMap) | |
| 327 | 336 | MAKE_TO_LOCAL(CallableToLocal, JSReceiver, Function) | |
| 337 | + MAKE_TO_LOCAL(ToLocalPrimitive, Object, Primitive) | ||
| 338 | + MAKE_TO_LOCAL(ToLocal, FixedArray, PrimitiveArray) | ||
| 339 | + MAKE_TO_LOCAL(ScriptOrModuleToLocal, Script, ScriptOrModule) | ||
| 328 | 340 | ||
| 329 | 341 | #undef MAKE_TO_LOCAL_TYPED_ARRAY | |
| 330 | 342 | #undef MAKE_TO_LOCAL | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3540,6 +3540,8 @@ bool Bootstrapper::CompileNative(Isolate* isolate, Vector<const char> name, | |||
| 3540 | 3540 | Compiler::GetSharedFunctionInfoForScript( | |
| 3541 | 3541 | source, script_name, 0, 0, ScriptOriginOptions(), Handle<Object>(), | |
| 3542 | 3542 | context, NULL, NULL, ScriptCompiler::kNoCompileOptions, natives_flag); | |
| 3543 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 3544 | + // Handle<FixedArray>()); | ||
| 3543 | 3545 | if (function_info.is_null()) return false; | |
| 3544 | 3546 | ||
| 3545 | 3547 | DCHECK(context->IsNativeContext()); | |
@@ -3602,6 +3604,8 @@ bool Genesis::CompileExtension(Isolate* isolate, v8::Extension* extension) { | |||
| 3602 | 3604 | function_info = Compiler::GetSharedFunctionInfoForScript( | |
| 3603 | 3605 | source, script_name, 0, 0, ScriptOriginOptions(), Handle<Object>(), | |
| 3604 | 3606 | context, extension, NULL, ScriptCompiler::kNoCompileOptions, | |
| 3607 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 3608 | + // EXTENSION_CODE, Handle<FixedArray>()); | ||
| 3605 | 3609 | EXTENSION_CODE); | |
| 3606 | 3610 | if (function_info.is_null()) return false; | |
| 3607 | 3611 | cache->Add(name, function_info); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1192,6 +1192,9 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForScript( | |||
| 1192 | 1192 | int column_offset, ScriptOriginOptions resource_options, | |
| 1193 | 1193 | Handle<Object> source_map_url, Handle<Context> context, | |
| 1194 | 1194 | v8::Extension* extension, ScriptData** cached_data, | |
| 1195 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 1196 | + // ScriptCompiler::CompileOptions compile_options, NativesFlag natives, | ||
| 1197 | + // Handle<FixedArray> host_defined_options) { | ||
| 1195 | 1198 | ScriptCompiler::CompileOptions compile_options, NativesFlag natives) { | |
| 1196 | 1199 | Isolate* isolate = source->GetIsolate(); | |
| 1197 | 1200 | if (compile_options == ScriptCompiler::kNoCompileOptions) { | |
@@ -1288,6 +1291,10 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForScript( | |||
| 1288 | 1291 | if (!source_map_url.is_null()) { | |
| 1289 | 1292 | script->set_source_mapping_url(*source_map_url); | |
| 1290 | 1293 | } | |
| 1294 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 1295 | + // if (!host_defined_options.is_null()) { | ||
| 1296 | + // script->set_host_defined_options(*host_defined_options); | ||
| 1297 | + // } | ||
| 1291 | 1298 | ||
| 1292 | 1299 | // Compile the function and add it to the cache. | |
| 1293 | 1300 | ParseInfo parse_info(script); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -114,6 +114,8 @@ class V8_EXPORT_PRIVATE Compiler : public AllStatic { | |||
| 114 | 114 | v8::Extension* extension, ScriptData** cached_data, | |
| 115 | 115 | ScriptCompiler::CompileOptions compile_options, | |
| 116 | 116 | NativesFlag is_natives_code); | |
| 117 | + // Backed out for ABI compatibility with V8 6.2 | ||
| 118 | + // NativesFlag is_natives_code, Handle<FixedArray> host_defined_options); | ||
| 117 | 119 | ||
| 118 | 120 | // Create a shared function info object for a Script that has already been | |
| 119 | 121 | // parsed while the script was being loaded from a streamed source. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments