Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index dfedc7c9aaae0c562d3444d9619408f2b58d1ed4..30e10e63b57d9a4c02c6b271ce02fead54a8086e 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -13,6 +13,7 @@ |
#include "src/extensions/gc-extension.h" |
#include "src/extensions/statistics-extension.h" |
#include "src/extensions/trigger-failure-extension.h" |
+#include "src/heap/heap.h" |
#include "src/snapshot/natives.h" |
#include "src/snapshot/snapshot.h" |
#include "third_party/fdlibm/fdlibm.h" |
@@ -1795,8 +1796,6 @@ void Bootstrapper::ImportNatives(Isolate* isolate, Handle<JSObject> container) { |
INSTALL_NATIVE(JSFunction, "URIError", uri_error_function); |
INSTALL_NATIVE(JSFunction, "MakeError", make_error_function); |
- INSTALL_NATIVE(Symbol, "promiseStatus", promise_status); |
- INSTALL_NATIVE(Symbol, "promiseValue", promise_value); |
INSTALL_NATIVE(JSFunction, "PromiseCreate", promise_create); |
INSTALL_NATIVE(JSFunction, "PromiseResolve", promise_resolve); |
INSTALL_NATIVE(JSFunction, "PromiseReject", promise_reject); |
@@ -1907,6 +1906,21 @@ bool Bootstrapper::InstallJSBuiltins(Isolate* isolate, |
} |
+void Bootstrapper::ExportPrivateSymbols(Isolate* isolate, |
+ Handle<JSObject> container) { |
+ HandleScope scope(isolate); |
+#define EXPORT_PRIVATE_SYMBOL(NAME) \ |
+ Handle<String> NAME##_name = \ |
+ isolate->factory()->NewStringFromAsciiChecked(#NAME); \ |
+ JSObject::AddProperty(container, NAME##_name, isolate->factory()->NAME(), \ |
+ NONE); |
+ |
+ PRIVATE_SYMBOL_LIST(EXPORT_PRIVATE_SYMBOL) |
+ |
+#undef EXPORT_PRIVATE_SYMBOL |
+} |
+ |
+ |
#define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \ |
void Genesis::InitializeGlobal_##id() {} |
@@ -2789,24 +2803,6 @@ bool Genesis::InstallSpecialObjects(Handle<Context> native_context) { |
JSObject::AddProperty(global, natives_key, natives, DONT_ENUM); |
} |
- // Expose the stack trace symbol to native JS. |
- RETURN_ON_EXCEPTION_VALUE(isolate, |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- handle(native_context->builtins(), isolate), |
- factory->InternalizeOneByteString( |
- STATIC_CHAR_VECTOR("$stackTraceSymbol")), |
- factory->stack_trace_symbol(), NONE), |
- false); |
- |
- // Expose the internal error symbol to native JS |
- RETURN_ON_EXCEPTION_VALUE(isolate, |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- handle(native_context->builtins(), isolate), |
- factory->InternalizeOneByteString( |
- STATIC_CHAR_VECTOR("$internalErrorSymbol")), |
- factory->internal_error_symbol(), NONE), |
- false); |
- |
// Expose the debug global object in global if a name for it is specified. |
if (FLAG_expose_debug_as != NULL && strlen(FLAG_expose_debug_as) != 0) { |
// If loading fails we just bail out without installing the |