Skip to content

Commit

Permalink
Excising confusing, non-functional cruft. Sorry it took so long.
Browse files Browse the repository at this point in the history
  • Loading branch information
gleneivey committed Nov 16, 2009
1 parent 2977318 commit 3a50a6f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 44 deletions.
34 changes: 12 additions & 22 deletions dist/env.rhino.js
Expand Up @@ -216,16 +216,6 @@ var Envjs = function(){
};

$env.loadInlineScript = function(script){};


$env.getFreshScopeObj = function(){};
$env.getProxyFor = function(){};
$env.getScope = function(){};
$env.setScope = function(){};
$env.configureScope = function(){};
$env.restoreScope = function(){};


$env.loadFrame = function(frameElement, url){
try {
if (frameElement._content){
Expand Down Expand Up @@ -283,25 +273,25 @@ var Envjs = function(){

function recordScopesOfKeyObjects(fnToExecInOtherContext){
return { // getScope()/setScope() from Window.java
frame : $env.getScope(fnToExecInOtherContext),
window : $env.getScope($env.window),
global_load : $env.getScope($env.loadIntoFnsScope),
local_load : $env.getScope($env.loadLocalScript)
frame : getScope(fnToExecInOtherContext),
window : getScope($env.window),
global_load : getScope($env.loadIntoFnsScope),
local_load : getScope($env.loadLocalScript)
};
}

function setScopesOfKeyObjects(fnToExecInOtherContext, windowObj){
$env.setScope(fnToExecInOtherContext, windowObj);
$env.setScope($env.window, windowObj);
$env.setScope($env.loadIntoFnsScope, windowObj);
$env.setScope($env.loadLocalScript, windowObj);
setScope(fnToExecInOtherContext, windowObj);
setScope($env.window, windowObj);
setScope($env.loadIntoFnsScope, windowObj);
setScope($env.loadLocalScript, windowObj);
}

function restoreScopesOfKeyObjects(fnToExecInOtherContext, scopes){
$env.setScope(fnToExecInOtherContext, scopes.frame);
$env.setScope($env.window, scopes.window);
$env.setScope($env.loadIntoFnsScope, scopes.global_load);
$env.setScope($env.loadLocalScript, scopes.local_load);
setScope(fnToExecInOtherContext, scopes.frame);
setScope($env.window, scopes.window);
setScope($env.loadIntoFnsScope, scopes.global_load);
setScope($env.loadLocalScript, scopes.local_load);
}
})(Envjs);

Expand Down
34 changes: 12 additions & 22 deletions src/platform/core.js
Expand Up @@ -211,16 +211,6 @@ var Envjs = function(){
};

$env.loadInlineScript = function(script){};


$env.getFreshScopeObj = function(){};
$env.getProxyFor = function(){};
$env.getScope = function(){};
$env.setScope = function(){};
$env.configureScope = function(){};
$env.restoreScope = function(){};


$env.loadFrame = function(frameElement, url){
try {
if (frameElement._content){
Expand Down Expand Up @@ -278,25 +268,25 @@ var Envjs = function(){

function recordScopesOfKeyObjects(fnToExecInOtherContext){
return { // getScope()/setScope() from Window.java
frame : $env.getScope(fnToExecInOtherContext),
window : $env.getScope($env.window),
global_load : $env.getScope($env.loadIntoFnsScope),
local_load : $env.getScope($env.loadLocalScript)
frame : getScope(fnToExecInOtherContext),
window : getScope($env.window),
global_load : getScope($env.loadIntoFnsScope),
local_load : getScope($env.loadLocalScript)
};
}

function setScopesOfKeyObjects(fnToExecInOtherContext, windowObj){
$env.setScope(fnToExecInOtherContext, windowObj);
$env.setScope($env.window, windowObj);
$env.setScope($env.loadIntoFnsScope, windowObj);
$env.setScope($env.loadLocalScript, windowObj);
setScope(fnToExecInOtherContext, windowObj);
setScope($env.window, windowObj);
setScope($env.loadIntoFnsScope, windowObj);
setScope($env.loadLocalScript, windowObj);
}

function restoreScopesOfKeyObjects(fnToExecInOtherContext, scopes){
$env.setScope(fnToExecInOtherContext, scopes.frame);
$env.setScope($env.window, scopes.window);
$env.setScope($env.loadIntoFnsScope, scopes.global_load);
$env.setScope($env.loadLocalScript, scopes.local_load);
setScope(fnToExecInOtherContext, scopes.frame);
setScope($env.window, scopes.window);
setScope($env.loadIntoFnsScope, scopes.global_load);
setScope($env.loadLocalScript, scopes.local_load);
}
})(Envjs);

0 comments on commit 3a50a6f

Please sign in to comment.