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

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 705623002: Initialize V8 in PDFium from external files (in-renderer process only). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from Ross and Raymes Created 6 years, 1 month 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
Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index 4efdbb6458c958fbda35c459dc4fe58886c3ee59..2c689ac42ac6931bc8a542fb9af89906cb6cff44 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -139,6 +139,10 @@
#include "skia/ext/platform_canvas.h"
#endif
+#ifdef V8_USE_EXTERNAL_STARTUP_DATA
+#include "gin/public/isolate_holder.h"
+#endif
+
using base::StringPrintf;
using ppapi::InputEventData;
using ppapi::PpapiGlobals;
@@ -1437,6 +1441,19 @@ void PepperPluginInstanceImpl::PostMessageToJavaScript(PP_Var message) {
message_channel_->PostMessageToJavaScript(message);
}
+#ifdef V8_USE_EXTERNAL_STARTUP_DATA
raymes 2014/11/10 03:29:06 You can move the #ifdef into the function and retu
baixo1 2014/11/10 15:59:48 Done.
baixo1 2014/11/10 17:16:49 Better yet, I made gin handle this :)
+void PepperPluginInstanceImpl::GetV8ExternalSnapshotData(
+ const char** natives_data_out,
+ int* natives_size_out,
+ const char** snapshot_data_out,
+ int* snapshot_size_out) const {
raymes 2014/11/10 03:29:06 nit: the indentation looks wrong here. I think you
baixo1 2014/11/10 15:59:48 Done.
+ gin::IsolateHolder::GetV8ExternalSnapshotData(natives_data_out,
+ natives_size_out,
+ snapshot_data_out,
+ snapshot_size_out);
+}
+#endif
+
int32_t PepperPluginInstanceImpl::RegisterMessageHandler(
PP_Instance instance,
void* user_data,

Powered by Google App Engine
This is Rietveld 408576698