void EmbedderTest::SetUp() { v8::V8::InitializeICU(); platform_ = v8::platform::CreateDefaultPlatform(); v8::V8::InitializePlatform(platform_); v8::V8::Initialize(); // By enabling predictable mode, V8 won't post any background tasks. const char predictable_flag[] = "--predictable"; v8::V8::SetFlagsFromString(predictable_flag, static_cast<int>(strlen(predictable_flag))); #ifdef V8_USE_EXTERNAL_STARTUP_DATA ASSERT_TRUE(GetExternalData(g_exe_path_, "natives_blob.bin", &natives_)); ASSERT_TRUE(GetExternalData(g_exe_path_, "snapshot_blob.bin", &snapshot_)); v8::V8::SetNativesDataBlob(&natives_); v8::V8::SetSnapshotDataBlob(&snapshot_); #endif // V8_USE_EXTERNAL_STARTUP_DATA FPDF_InitLibrary(); UNSUPPORT_INFO* info = static_cast<UNSUPPORT_INFO*>(this); memset(info, 0, sizeof(UNSUPPORT_INFO)); info->version = 1; info->FSDK_UnSupport_Handler = UnsupportedHandlerTrampoline; FSDK_SetUnSpObjProcessHandler(info); }
void EmbedderTest::SetUp() { v8::V8::InitializeICU(); #ifdef V8_USE_EXTERNAL_STARTUP_DATA ASSERT_TRUE(GetExternalData(g_exe_path_, "natives_blob.bin", &natives_)); ASSERT_TRUE(GetExternalData(g_exe_path_, "snapshot_blob.bin", &snapshot_)); v8::V8::SetNativesDataBlob(&natives_); v8::V8::SetSnapshotDataBlob(&snapshot_); #endif // V8_USE_EXTERNAL_STARTUP_DATA FPDF_InitLibrary(); UNSUPPORT_INFO* info = static_cast<UNSUPPORT_INFO*>(this); memset(info, 0, sizeof(UNSUPPORT_INFO)); info->version = 1; info->FSDK_UnSupport_Handler = UnsupportedHandlerTrampoline; FSDK_SetUnSpObjProcessHandler(info); }
void EmbedderTest::SetUp() { v8::V8::InitializeICU(); #ifdef V8_USE_EXTERNAL_STARTUP_DATA ASSERT_TRUE(GetExternalData(g_exe_path_, "natives_blob.bin", &natives_)); ASSERT_TRUE(GetExternalData(g_exe_path_, "snapshot_blob.bin", &snapshot_)); v8::V8::SetNativesDataBlob(&natives_); v8::V8::SetSnapshotDataBlob(&snapshot_); #endif // V8_USE_EXTERNAL_STARTUP_DATA FPDF_InitLibrary(); UNSUPPORT_INFO unsuppored_info; memset(&unsuppored_info, '\0', sizeof(unsuppored_info)); unsuppored_info.version = 1; unsuppored_info.FSDK_UnSupport_Handler = Unsupported_Handler; FSDK_SetUnSpObjProcessHandler(&unsuppored_info); }