Bug 672283 - eval cache should hit if both 'principals' and 'script->principals' are null (r=mrbkap)

This commit is contained in:
Luke Wagner 2011-07-18 17:39:28 -07:00
parent 5d68ed0dbd
commit 61b3a57a82

View File

@ -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)))) {
/*