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

Unified Diff: native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc

Issue 148223005: [NaCl SDK] Add fake for ppb_host_resolver and ppb_net_address (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
Index: native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc b/native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc
index edf1eb89b952cb0fec73db516800ab5cdb020a2d..d8d3d98df7524e5c99225a85b73874ac59ccd0bb 100644
--- a/native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc
+++ b/native_client_sdk/src/libraries/nacl_io/kernel_intercept.cc
@@ -33,6 +33,14 @@ void ki_init(void* kp) {
void ki_init_ppapi(void* kp,
PP_Instance instance,
PPB_GetInterface get_browser_interface) {
+ PepperInterface* ppapi = NULL;
+ if (instance && get_browser_interface)
+ ppapi = new RealPepperInterface(instance, get_browser_interface);
+ ki_init_interface(kp, ppapi);
+}
+
+void ki_init_interface(void* kp, void* pepper_interface) {
+ PepperInterface* ppapi = static_cast<PepperInterface*>(pepper_interface);
kernel_wrap_init();
if (kp == NULL) {
@@ -43,10 +51,6 @@ void ki_init_ppapi(void* kp,
s_kp_owned = false;
}
- PepperInterface* ppapi = NULL;
- if (instance && get_browser_interface)
- ppapi = new RealPepperInterface(instance, get_browser_interface);
-
s_kp->Init(ppapi);
}
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/kernel_intercept.h ('k') | native_client_sdk/src/tests/nacl_io_test/example.dsc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698