diff --git a/dom/bindings/Exceptions.cpp b/dom/bindings/Exceptions.cpp index 59efe286aa95..3faaed78ee73 100644 --- a/dom/bindings/Exceptions.cpp +++ b/dom/bindings/Exceptions.cpp @@ -182,16 +182,7 @@ GetCurrentJSStack() return nullptr; } - // peel off native frames... - uint32_t language; - nsCOMPtr caller; - while (stack && - NS_SUCCEEDED(stack->GetLanguage(&language)) && - language != nsIProgrammingLanguage::JAVASCRIPT && - NS_SUCCEEDED(stack->GetCaller(getter_AddRefs(caller))) && - caller) { - stack = caller; - } + // Note that CreateStack only returns JS frames, so we're done here. return stack.forget(); }