diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index 035eeef8581..1f37702a284 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -634,15 +634,6 @@ FunctionBox::FunctionBox(ExclusiveContext* cx, ObjectBox* traceListHead, JSFunct FunctionBox* parent = outerpc->sc->asFunctionBox(); if (parent && parent->inWith) inWith = true; - } else { - // This is like the above case, but when inside eval. - // - // For example: - // - // with(o) { eval("(function() { g(); })();"); } - // - // In this case, the static scope chain tells us the presence of with. - inWith = outerpc->sc->asGlobalSharedContext()->inWith(); } } diff --git a/js/src/frontend/SharedContext.h b/js/src/frontend/SharedContext.h index 85c9ad47b45..8599f68d7ee 100644 --- a/js/src/frontend/SharedContext.h +++ b/js/src/frontend/SharedContext.h @@ -280,14 +280,6 @@ class GlobalSharedContext : public SharedContext } return false; } - - bool inWith() const { - for (StaticScopeIter it(context, topStaticScope_); !it.done(); it++) { - if (it.type() == StaticScopeIter::With) - return true; - } - return false; - } }; class FunctionBox : public ObjectBox, public SharedContext