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

Side by Side Diff: src/bootstrapper.cc

Issue 2796243002: Add isPromise V8 extras util (Closed)
Patch Set: Fix typo Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/js/prologue.js » ('j') | src/js/prologue.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project 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 "src/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/base/ieee754.h" 9 #include "src/base/ieee754.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 4196 matching lines...) Expand 10 before | Expand all | Expand 10 after
4207 Handle<JSObject> extras_utils = 4207 Handle<JSObject> extras_utils =
4208 factory()->NewJSObject(isolate()->object_function()); 4208 factory()->NewJSObject(isolate()->object_function());
4209 native_context()->set_extras_utils_object(*extras_utils); 4209 native_context()->set_extras_utils_object(*extras_utils);
4210 4210
4211 InstallInternalArray(extras_utils, "InternalPackedArray", FAST_ELEMENTS); 4211 InstallInternalArray(extras_utils, "InternalPackedArray", FAST_ELEMENTS);
4212 4212
4213 InstallFunction(extras_utils, isolate()->promise_internal_constructor(), 4213 InstallFunction(extras_utils, isolate()->promise_internal_constructor(),
4214 factory()->NewStringFromAsciiChecked("createPromise")); 4214 factory()->NewStringFromAsciiChecked("createPromise"));
4215 InstallFunction(extras_utils, isolate()->promise_resolve(), 4215 InstallFunction(extras_utils, isolate()->promise_resolve(),
4216 factory()->NewStringFromAsciiChecked("resolvePromise")); 4216 factory()->NewStringFromAsciiChecked("resolvePromise"));
4217 InstallFunction(extras_utils, isolate()->is_promise(),
4218 factory()->NewStringFromAsciiChecked("isPromise"));
4217 4219
4218 int builtin_index = Natives::GetDebuggerCount(); 4220 int builtin_index = Natives::GetDebuggerCount();
4219 // Only run prologue.js and runtime.js at this point. 4221 // Only run prologue.js and runtime.js at this point.
4220 DCHECK_EQ(builtin_index, Natives::GetIndex("prologue")); 4222 DCHECK_EQ(builtin_index, Natives::GetIndex("prologue"));
4221 if (!Bootstrapper::CompileBuiltin(isolate(), builtin_index++)) return false; 4223 if (!Bootstrapper::CompileBuiltin(isolate(), builtin_index++)) return false;
4222 DCHECK_EQ(builtin_index, Natives::GetIndex("runtime")); 4224 DCHECK_EQ(builtin_index, Natives::GetIndex("runtime"));
4223 if (!Bootstrapper::CompileBuiltin(isolate(), builtin_index++)) return false; 4225 if (!Bootstrapper::CompileBuiltin(isolate(), builtin_index++)) return false;
4224 4226
4225 { 4227 {
4226 // Builtin function for OpaqueReference -- a JSValue-based object, 4228 // Builtin function for OpaqueReference -- a JSValue-based object,
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
5281 } 5283 }
5282 5284
5283 5285
5284 // Called when the top-level V8 mutex is destroyed. 5286 // Called when the top-level V8 mutex is destroyed.
5285 void Bootstrapper::FreeThreadResources() { 5287 void Bootstrapper::FreeThreadResources() {
5286 DCHECK(!IsActive()); 5288 DCHECK(!IsActive());
5287 } 5289 }
5288 5290
5289 } // namespace internal 5291 } // namespace internal
5290 } // namespace v8 5292 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/js/prologue.js » ('j') | src/js/prologue.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698