Skip to content

Commit

Permalink
#621: wallpaper and speculative fix (didn't work, but good to have)
Browse files Browse the repository at this point in the history
  • Loading branch information
classilla committed Sep 9, 2020
1 parent c2d4942 commit cbcbd24
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
23 changes: 20 additions & 3 deletions caps/nsScriptSecurityManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,18 +693,35 @@ nsScriptSecurityManager::CheckLoadURIWithPrincipal(nsIPrincipal* aPrincipal,
// Scripts that somehow hit hard limits should go in here
if (!mIsTenFourFoxTroublesomeJsAllowed &&
(targetScheme.EqualsLiteral("http") || targetScheme.EqualsLiteral("https"))) {
nsAutoCString hostname;
if (MOZ_LIKELY(NS_SUCCEEDED(targetBaseURI->GetHost(hostname)))) {
nsAutoCString hostname, url;
if (MOZ_LIKELY(NS_SUCCEEDED(targetBaseURI->GetHost(hostname)) &&
NS_SUCCEEDED(targetBaseURI->GetAsciiSpec(url)))) {
ToLowerCase(hostname);
#define BLOC(q) hostname.EqualsLiteral(q)
#define BLOCU(q) url.EqualsLiteral(q)
if (0 ||

#ifdef __ppc__
/* No sites in blocklist currently */
/* // Wallpaper issue 621
BLOCU("https://static-exp1.licdn.com/sc/h/br/a9r8138k1irfu2dd3nc8lsbix") ||
BLOCU("https://static-exp1.licdn.com/sc/h/br/7lllmhir13652hrt9onk67idy") ||
BLOCU("https://static-exp1.licdn.com/sc/h/br/ykrp2se5j5958492sngjpz25") ||
BLOCU("https://static-exp1.licdn.com/sc/h/br/44lpm3xommt4uaobb0rsjjk0w") ||
BLOCU("https://static-exp1.licdn.com/sc/h/br/vlr4p5f5ashr0bmvreet5pvx") ||
BLOCU("https://static-exp1.licdn.com/sc/h/br/alufmlg2at1ul00ieyk97ixid") ||
BLOCU("https://static-exp1.licdn.com/sc/h/br/b24igfxqe5873icdp0jjivlxm") ||
BLOCU("https://static-exp1.licdn.com/sc/h/br/eebyccxtdylbl8mwqaz4jbzuo") ||
BLOCU("https://static-exp1.licdn.com/sc/h/br/157ealvvl2h15m378fl1ql2ko") ||
BLOCU("https://static-exp1.licdn.com/sc/h/br/1xfk2iz9afmrcwfdn8fqqu87r") ||
BLOCU("https://static-exp1.licdn.com/sc/h/br/238gxgltll8zj8cws2vtlows2") ||
BLOCU("https://static-exp1.licdn.com/sc/h/br/y57044rjondvhcx610qaq6ok") ||
*/
BLOCU("https://static-exp1.licdn.com/sc/h/br/2smvxovs24agey0kv9qjzih51") ||
#endif // __ppc__

0) {
#undef BLOC
#undef BLOCU

#ifndef DEBUG
if (mIsTenFourFoxTroublesomeJsLoggingEnabled)
Expand Down
11 changes: 10 additions & 1 deletion js/src/frontend/BytecodeEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1914,9 +1914,18 @@ BytecodeEmitter::bindNameToSlotHelper(ParseNode* pn)
* bloat where a single live function keeps its whole global script
* alive.), ScopeCoordinateToTypeSet is not able to find the var/let's
* associated TypeSet.
*
* Note the following does not prevent us from optimizing block scopes at
* global level, e.g.,
*
* { let x; function f() { x = 42; } }
*/
if (bceOfDef != this && bceOfDef->sc->isGlobalContext())
if (dn->kind() == Definition::LET || dn->kind() == Definition::CONSTANT) {
if (IsStaticGlobalLexicalScope(blockScopeOfDef(dn)))
return true;
} else if (bceOfDef != this && bceOfDef->sc->isGlobalContext()) {
return true;
}

if (!pn->pn_scopecoord.set(parser->tokenStream, hops, slot))
return false;
Expand Down

0 comments on commit cbcbd24

Please sign in to comment.