Title: [209028] trunk/Source/_javascript_Core
- Revision
- 209028
- Author
- [email protected]
- Date
- 2016-11-28 15:14:43 -0800 (Mon, 28 Nov 2016)
Log Message
Fix exception scope verification failures in JSScope.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165047
Reviewed by Saam Barati.
* runtime/JSScope.cpp:
(JSC::JSScope::resolve):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (209027 => 209028)
--- trunk/Source/_javascript_Core/ChangeLog 2016-11-28 23:07:33 UTC (rev 209027)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-11-28 23:14:43 UTC (rev 209028)
@@ -1,5 +1,15 @@
2016-11-28 Mark Lam <[email protected]>
+ Fix exception scope verification failures in JSScope.cpp.
+ https://bugs.webkit.org/show_bug.cgi?id=165047
+
+ Reviewed by Saam Barati.
+
+ * runtime/JSScope.cpp:
+ (JSC::JSScope::resolve):
+
+2016-11-28 Mark Lam <[email protected]>
+
Fix exception scope verification failures in JSTypedArrayViewPrototype.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165049
Modified: trunk/Source/_javascript_Core/runtime/JSScope.cpp (209027 => 209028)
--- trunk/Source/_javascript_Core/runtime/JSScope.cpp 2016-11-28 23:07:33 UTC (rev 209027)
+++ trunk/Source/_javascript_Core/runtime/JSScope.cpp 2016-11-28 23:14:43 UTC (rev 209028)
@@ -26,6 +26,7 @@
#include "config.h"
#include "JSScope.h"
+#include "Exception.h"
#include "JSGlobalObject.h"
#include "JSLexicalEnvironment.h"
#include "JSModuleEnvironment.h"
@@ -229,19 +230,26 @@
if (++it == end) {
JSScope* globalScopeExtension = scope->globalObject(vm)->globalScopeExtension();
if (UNLIKELY(globalScopeExtension)) {
- if (object->hasProperty(exec, ident))
+ bool hasProperty = object->hasProperty(exec, ident);
+ RETURN_IF_EXCEPTION(throwScope, nullptr);
+ if (hasProperty)
return object;
JSObject* extensionScopeObject = JSScope::objectAtScope(globalScopeExtension);
- if (extensionScopeObject->hasProperty(exec, ident))
+ hasProperty = extensionScopeObject->hasProperty(exec, ident);
+ RETURN_IF_EXCEPTION(throwScope, nullptr);
+ if (hasProperty)
return extensionScopeObject;
}
return object;
}
- if (object->hasProperty(exec, ident)) {
- if (!isUnscopable(exec, scope, object, ident))
+ bool hasProperty = object->hasProperty(exec, ident);
+ RETURN_IF_EXCEPTION(throwScope, nullptr);
+ if (hasProperty) {
+ bool unscopable = isUnscopable(exec, scope, object, ident);
+ ASSERT(!throwScope.exception() || !unscopable);
+ if (!unscopable)
return object;
- ASSERT_WITH_MESSAGE_UNUSED(throwScope, !throwScope.exception(), "When an exception occurs, the result of isUnscopable becomes false");
}
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes