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

Unified Diff: test/cctest/test-serialize.cc

Issue 2429723005: Revert of [serializer] add test case for unknown external references. (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-serialize.cc
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
index 1ac37fb6d3b870af7eb0f696ee8a9fe047f125c0..5e0b7b3c7af377f928a4ff1c1871ddf357bfe75c 100644
--- a/test/cctest/test-serialize.cc
+++ b/test/cctest/test-serialize.cc
@@ -2010,11 +2010,12 @@
delete[] blob.data;
}
-void SerializedCallback(const v8::FunctionCallbackInfo<v8::Value>& args) {
+static void SerializedCallback(
+ const v8::FunctionCallbackInfo<v8::Value>& args) {
args.GetReturnValue().Set(v8_num(42));
}
-void SerializedCallbackReplacement(
+static void SerializedCallbackReplacement(
const v8::FunctionCallbackInfo<v8::Value>& args) {
args.GetReturnValue().Set(v8_num(1337));
}
@@ -2082,30 +2083,6 @@
}
isolate->Dispose();
}
- delete[] blob.data;
-}
-
-TEST(SnapshotCreatorUnknownExternalReferences) {
- DisableTurbofan();
- v8::SnapshotCreator creator;
- v8::Isolate* isolate = creator.GetIsolate();
- {
- v8::HandleScope handle_scope(isolate);
- v8::Local<v8::Context> context = v8::Context::New(isolate);
- v8::Context::Scope context_scope(context);
-
- v8::Local<v8::FunctionTemplate> callback =
- v8::FunctionTemplate::New(isolate, SerializedCallback);
- v8::Local<v8::Value> function =
- callback->GetFunction(context).ToLocalChecked();
- CHECK(context->Global()->Set(context, v8_str("f"), function).FromJust());
- ExpectInt32("f()", 42);
-
- CHECK_EQ(0, creator.AddContext(context));
- }
- v8::StartupData blob =
- creator.CreateBlob(v8::SnapshotCreator::FunctionCodeHandling::kClear);
-
delete[] blob.data;
}
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698