summaryrefslogtreecommitdiffstats
path: root/native_client_sdk
diff options
context:
space:
mode:
authorbinji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-11 02:22:35 +0000
committerbinji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-11 02:22:35 +0000
commitb0b5519b6b692908f11584db8820294bb3663934 (patch)
tree69d913b3e038b1d1988882e9c49ad54fc8647291 /native_client_sdk
parent71980fdf7fa8916d543226ad36f50f13cc13f928 (diff)
downloadchromium_src-b0b5519b6b692908f11584db8820294bb3663934.zip
chromium_src-b0b5519b6b692908f11584db8820294bb3663934.tar.gz
chromium_src-b0b5519b6b692908f11584db8820294bb3663934.tar.bz2
[NaCl SDK] Fix running .pexe in Release mode.
(NOTE: this fixes the NaCl SDK waterfall) A bug in common.js was causing the embed to load .pexe with application/x-nacl, which produces a bizarre failure message: NaCl module load failed: manifest: program property 'portable' does not have required key: 'url'. BUG=none R=noelallen@chromium.org Review URL: https://codereview.chromium.org/22777002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216889 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rw-r--r--native_client_sdk/src/examples/common.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/native_client_sdk/src/examples/common.js b/native_client_sdk/src/examples/common.js
index f6c6393..9494930 100644
--- a/native_client_sdk/src/examples/common.js
+++ b/native_client_sdk/src/examples/common.js
@@ -6,6 +6,10 @@
// string.
var isTest = false;
+// Set to true when loading a "Release" NaCl module, false when loading a
+// "Debug" NaCl module.
+var isRelease = false;
+
// Javascript module pattern:
// see http://en.wikipedia.org/wiki/Unobtrusive_JavaScript#Namespaces
// In essence, we define an anonymous function which is immediately called and
@@ -22,11 +26,10 @@ var common = (function() {
* Return the mime type for NaCl plugin.
*
* @param {string} tool The name of the toolchain, e.g. "glibc", "newlib" etc.
- * @param {bool} isRelease True if this is a release build.
* @return {string} The mime-type for the kind of NaCl plugin matching
* the given toolchain.
*/
- function mimeTypeForTool(tool, isRelease) {
+ function mimeTypeForTool(tool) {
// For NaCl modules use application/x-nacl.
var mimetype = 'application/x-nacl';
if (isHostToolchain(tool)) {
@@ -293,8 +296,8 @@ var common = (function() {
// status message indicating that the module is still loading. Otherwise,
// do not change the status message.
updateStatus('Page loaded.');
- var isRelease = path.toLowerCase().indexOf('release') != -1;
- if (!browserSupportsNaCl(tool, isRelease)) {
+ isRelease = path.toLowerCase().indexOf('release') != -1;
+ if (!browserSupportsNaCl(tool)) {
updateStatus(
'Browser does not support NaCl (' + tool + '), or NaCl is disabled');
} else if (common.naclModule == null) {