Commit cd61390e authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

[snapshot] include fewer strings.

R=mstarzinger@chromium.org

Change-Id: I6cb9d9b7b82ce05299bb6088b187e91c4fa2ca0f
Reviewed-on: https://chromium-review.googlesource.com/649750
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47911}
parent 5f3a2def
......@@ -1704,7 +1704,7 @@ Node* RegExpBuiltinsAssembler::RegExpExec(Node* context, Node* regexp,
GotoIf(WordEqual(result, NullConstant()), &out);
ThrowIfNotJSReceiver(context, result,
MessageTemplate::kInvalidRegExpExecResult, "unused");
MessageTemplate::kInvalidRegExpExecResult, "");
Goto(&out);
}
......
......@@ -460,9 +460,7 @@ void Heap::CreateInitialObjects() {
HandleScope scope(isolate());
#define SYMBOL_INIT(name) \
{ \
Handle<String> name##d = factory->NewStringFromStaticChars(#name); \
Handle<Symbol> symbol(isolate()->factory()->NewPrivateSymbol()); \
symbol->set_name(*name##d); \
roots_[k##name##RootIndex] = *symbol; \
}
PRIVATE_SYMBOL_LIST(SYMBOL_INIT)
......
......@@ -66,6 +66,12 @@ void StartupSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
} else if (obj->IsScript() && Script::cast(obj)->IsUserJavaScript()) {
Script::cast(obj)->set_context_data(
isolate_->heap()->uninitialized_symbol());
} else if (obj->IsSharedFunctionInfo()) {
// Clear inferred name for native functions.
SharedFunctionInfo* shared = SharedFunctionInfo::cast(obj);
if (!shared->IsSubjectToDebugging() && shared->HasInferredName()) {
shared->set_inferred_name(isolate()->heap()->empty_string());
}
}
if (obj->IsHashTable()) CheckRehashability(obj);
......
......@@ -60,8 +60,8 @@ TEST(NoSideEffectsToString) {
CheckObject(isolate, factory->null_value(), "null");
CheckObject(isolate, factory->error_to_string(), "[object Error]");
CheckObject(isolate, factory->stack_trace_symbol(),
"Symbol(stack_trace_symbol)");
CheckObject(isolate, factory->unscopables_symbol(),
"Symbol(Symbol.unscopables)");
CheckObject(isolate, factory->NewError(isolate->error_function(),
factory->empty_string()),
"Error");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment