Changeset 737
- Timestamp:
- 04/18/08 13:45:57 (8 months ago)
- Files:
-
- branches/global-object (deleted)
- trunk/src/build.sh (modified) (1 diff)
- trunk/src/components/greasemonkey.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/build.sh
r719 r737 45 45 46 46 echo "Patching chrome.manifest with jar ..." 47 sed -e \ 48 "/^content\|^skin\|^locale/s#\(.*\) chrome/\(.*\)#\1 jar:chrome/$GMNAME.jar!/\2#" \ 49 chrome.manifest > chrome.manifest.jar 47 sed -e "/^content/s#\(.*\) chrome/\(.*\)#\1 jar:chrome/$GMNAME.jar!/\2#" \ 48 -e "/^locale/s#\(.*\) chrome/\(.*\)#\1 jar:chrome/$GMNAME.jar!/\2#" \ 49 -e "/^skin/s#\(.*\) chrome/\(.*\)#\1 jar:chrome/$GMNAME.jar!/\2#" \ 50 chrome.manifest > chrome.manifest.jar 50 51 mv chrome.manifest.jar chrome.manifest 51 52 trunk/src/components/greasemonkey.js
r694 r737 303 303 script.offsets = offsets; 304 304 305 var scriptSrc = " (function(){\n" +305 var scriptSrc = "\n" + // error line-number calculations depend on these 306 306 requires.join("\n") + 307 307 "\n" + 308 308 contents + 309 "\n})()"; 310 this.evalInSandbox(scriptSrc, 311 url, 312 sandbox, 313 script); 309 "\n"; 310 if (!this.evalInSandbox(scriptSrc, url, sandbox, script)) 311 this.evalInSandbox("(function(){"+ scriptSrc +"})()", 312 url, sandbox, script); 314 313 } 315 314 }, … … 347 346 Components.utils.evalInSandbox(code, sandbox); 348 347 } catch (e) { 348 if ("return not in function" == e.message) // pre-0.8 GM compat: 349 return false; // this script depends on the function enclosure 350 349 351 // try to find the line of the actual error line 350 352 var line = e.lineNumber; … … 379 381 } 380 382 } 383 return true; // did not need a (function() {...})() enclosure. 381 384 }, 382 385
