diff options
author | jvoung@google.com <jvoung@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-28 02:47:41 +0000 |
---|---|---|
committer | jvoung@google.com <jvoung@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-28 02:47:41 +0000 |
commit | b6c56d0bad98f17ee21a540fd2c14f1e09d98538 (patch) | |
tree | 7afca2570aa02f4cd78e389f7213a0c315d95c8e /ppapi/native_client | |
parent | 885367fef04c0bcb845834b7cefcdc2e404ee5e6 (diff) | |
download | chromium_src-b6c56d0bad98f17ee21a540fd2c14f1e09d98538.zip chromium_src-b6c56d0bad98f17ee21a540fd2c14f1e09d98538.tar.gz chromium_src-b6c56d0bad98f17ee21a540fd2c14f1e09d98538.tar.bz2 |
Check NaCl debug mask (not just flag) before choosing PNaCl debug URL.
That way, the debug URL is chosen only if the app will be debugged.
BUG=http://code.google.com/p/nativeclient/issues/detail?id=3765
R=bradnelson@google.com, tsepez@chromium.org
TBR=bradnelson@chromium.org, teravest@chromium.org
Review URL: https://codereview.chromium.org/212103002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260067 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/native_client')
-rw-r--r-- | ppapi/native_client/src/trusted/plugin/plugin.cc | 3 | ||||
-rw-r--r-- | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.cc b/ppapi/native_client/src/trusted/plugin/plugin.cc index e550805..e98c4c8 100644 --- a/ppapi/native_client/src/trusted/plugin/plugin.cc +++ b/ppapi/native_client/src/trusted/plugin/plugin.cc @@ -1160,7 +1160,8 @@ bool Plugin::SetManifestObject(const nacl::string& manifest_json, bool is_pnacl = (mime_type() == kPnaclMIMEType); bool nonsfi_mode_enabled = PP_ToBool(nacl_interface_->IsNonSFIModeEnabled()); - bool pnacl_debug = GetNaClInterface()->NaClDebugStubEnabled(); + bool pnacl_debug = GetNaClInterface()->NaClDebugEnabledForURL( + manifest_base_url().c_str()); const char* sandbox_isa = nacl_interface_->GetSandboxArch(); nacl::scoped_ptr<JsonManifest> json_manifest( new JsonManifest(url_util_, diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c index 1c1fd05..c50d0ef 100644 --- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c +++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c @@ -3176,9 +3176,9 @@ static void Pnacl_M25_PPB_NaCl_Private_InstanceDestroyed(PP_Instance instance) { iface->InstanceDestroyed(instance); } -static PP_Bool Pnacl_M25_PPB_NaCl_Private_NaClDebugStubEnabled(void) { +static PP_Bool Pnacl_M25_PPB_NaCl_Private_NaClDebugEnabledForURL(const char* alleged_nmf_url) { const struct PPB_NaCl_Private_1_0 *iface = Pnacl_WrapperInfo_PPB_NaCl_Private_1_0.real_iface; - return iface->NaClDebugStubEnabled(); + return iface->NaClDebugEnabledForURL(alleged_nmf_url); } static const char* Pnacl_M25_PPB_NaCl_Private_GetSandboxArch(void) { @@ -5121,7 +5121,7 @@ static const struct PPB_NaCl_Private_1_0 Pnacl_Wrappers_PPB_NaCl_Private_1_0 = { .ReportLoadError = (void (*)(PP_Instance instance, PP_NaClError error, const char* error_message, const char* console_message))&Pnacl_M25_PPB_NaCl_Private_ReportLoadError, .InstanceCreated = (void (*)(PP_Instance instance))&Pnacl_M25_PPB_NaCl_Private_InstanceCreated, .InstanceDestroyed = (void (*)(PP_Instance instance))&Pnacl_M25_PPB_NaCl_Private_InstanceDestroyed, - .NaClDebugStubEnabled = (PP_Bool (*)(void))&Pnacl_M25_PPB_NaCl_Private_NaClDebugStubEnabled, + .NaClDebugEnabledForURL = (PP_Bool (*)(const char* alleged_nmf_url))&Pnacl_M25_PPB_NaCl_Private_NaClDebugEnabledForURL, .GetSandboxArch = (const char* (*)(void))&Pnacl_M25_PPB_NaCl_Private_GetSandboxArch, .GetUrlScheme = (PP_UrlSchemeType (*)(struct PP_Var url))&Pnacl_M25_PPB_NaCl_Private_GetUrlScheme, .LogToConsole = (void (*)(PP_Instance instance, const char* message))&Pnacl_M25_PPB_NaCl_Private_LogToConsole, |