mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-22 20:51:29 +00:00
upgrade Dojo to 1.6.1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
|
||||
Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
|
||||
Available via Academic Free License >= 2.1 OR the modified BSD license.
|
||||
see: http://dojotoolkit.org/license for details
|
||||
*/
|
||||
@@ -19,13 +19,13 @@ dojo._name = 'spidermonkey';
|
||||
|
||||
/*=====
|
||||
dojo.isSpidermonkey = {
|
||||
// summary: Detect spidermonkey
|
||||
// summary: Detect spidermonkey
|
||||
};
|
||||
=====*/
|
||||
|
||||
dojo.isSpidermonkey = true;
|
||||
dojo.exit = function(exitcode){
|
||||
quit(exitcode);
|
||||
dojo.exit = function(exitcode){
|
||||
quit(exitcode);
|
||||
}
|
||||
|
||||
if(typeof print == "function"){
|
||||
@@ -37,15 +37,15 @@ if(typeof line2pc == 'undefined'){
|
||||
}
|
||||
|
||||
dojo._spidermonkeyCurrentFile = function(depth){
|
||||
//
|
||||
//
|
||||
// This is a hack that determines the current script file by parsing a
|
||||
// generated stack trace (relying on the non-standard "stack" member variable
|
||||
// of the SpiderMonkey Error object).
|
||||
//
|
||||
//
|
||||
// If param depth is passed in, it'll return the script file which is that far down
|
||||
// the stack, but that does require that you know how deep your stack is when you are
|
||||
// calling.
|
||||
//
|
||||
//
|
||||
var s = '';
|
||||
try{
|
||||
throw Error("whatever");
|
||||
@@ -54,23 +54,23 @@ dojo._spidermonkeyCurrentFile = function(depth){
|
||||
}
|
||||
// lines are like: bu_getCurrentScriptURI_spidermonkey("ScriptLoader.js")@burst/Runtime.js:101
|
||||
var matches = s.match(/[^@]*\.js/gi);
|
||||
if(!matches){
|
||||
if(!matches){
|
||||
throw Error("could not parse stack string: '" + s + "'");
|
||||
}
|
||||
var fname = (typeof depth != 'undefined' && depth) ? matches[depth + 1] : matches[matches.length - 1];
|
||||
if(!fname){
|
||||
if(!fname){
|
||||
throw Error("could not find file name in stack string '" + s + "'");
|
||||
}
|
||||
//print("SpiderMonkeyRuntime got fname '" + fname + "' from stack string '" + s + "'");
|
||||
return fname;
|
||||
}
|
||||
|
||||
// print(dojo._spidermonkeyCurrentFile(0));
|
||||
// print(dojo._spidermonkeyCurrentFile(0));
|
||||
|
||||
dojo._loadUri = function(uri){
|
||||
// spidermonkey load() evaluates the contents into the global scope (which
|
||||
// is what we want).
|
||||
// TODO: sigh, load() does not return a useful value.
|
||||
// TODO: sigh, load() does not return a useful value.
|
||||
// Perhaps it is returning the value of the last thing evaluated?
|
||||
var ok = load(uri);
|
||||
// console.log("spidermonkey load(", uri, ") returned ", ok);
|
||||
|
||||
Reference in New Issue
Block a user