Skip to content
Browse files

Bug 672283 - eval cache should hit if both 'principals' and 'script->…

…principals' are null (r=mrbkap)
  • Loading branch information...
1 parent c71fb63 commit 1c7baac97d0528765a36e9c103cc8211af92f936 Luke Wagner committed Jul 18, 2011
Showing with 1 addition and 4 deletions.
  1. +1 −4 js/src/jsobj.cpp
View
5 js/src/jsobj.cpp
@@ -965,9 +965,6 @@ static JS_ALWAYS_INLINE JSScript *
EvalCacheLookup(JSContext *cx, JSLinearString *str, StackFrame *caller, uintN staticLevel,
JSPrincipals *principals, JSObject &scopeobj, JSScript **bucket)
{
- if (!principals)
- return NULL;
-
/*
* Cache local eval scripts indexed by source qualified by scope.
*
@@ -995,7 +992,7 @@ EvalCacheLookup(JSContext *cx, JSLinearString *str, StackFrame *caller, uintN st
script->getVersion() == version &&
!script->hasSingletons &&
(script->principals == principals ||
- (script->principals &&
+ (principals && script->principals &&
principals->subsume(principals, script->principals) &&
script->principals->subsume(script->principals, principals)))) {
/*

0 comments on commit 1c7baac

Please sign in to comment.
Something went wrong with that request. Please try again.