Diff
Modified: trunk/Source/_javascript_Core/API/JSObjectRef.cpp (206407 => 206408)
--- trunk/Source/_javascript_Core/API/JSObjectRef.cpp 2016-09-27 01:12:58 UTC (rev 206407)
+++ trunk/Source/_javascript_Core/API/JSObjectRef.cpp 2016-09-27 02:46:19 UTC (rev 206408)
@@ -309,24 +309,20 @@
return;
}
ExecState* exec = toJS(ctx);
- VM& vm = exec->vm();
- JSLockHolder locker(vm);
- auto scope = DECLARE_CATCH_SCOPE(vm);
+ JSLockHolder locker(exec);
JSObject* jsObject = toJS(object);
Identifier name(propertyName->identifier(&exec->vm()));
JSValue jsValue = toJS(exec, value);
- bool doesNotHaveProperty = attributes && !jsObject->hasProperty(exec, name);
- if (LIKELY(!scope.exception())) {
- if (doesNotHaveProperty) {
- PropertyDescriptor desc(jsValue, attributes);
- jsObject->methodTable()->defineOwnProperty(jsObject, exec, name, desc, false);
- } else {
- PutPropertySlot slot(jsObject);
- jsObject->methodTable()->put(jsObject, exec, name, jsValue, slot);
- }
+ if (attributes && !jsObject->hasProperty(exec, name)) {
+ PropertyDescriptor desc(jsValue, attributes);
+ jsObject->methodTable()->defineOwnProperty(jsObject, exec, name, desc, false);
+ } else {
+ PutPropertySlot slot(jsObject);
+ jsObject->methodTable()->put(jsObject, exec, name, jsValue, slot);
}
+
handleExceptionIfNeeded(exec, exception);
}
Modified: trunk/Source/_javascript_Core/ChangeLog (206407 => 206408)
--- trunk/Source/_javascript_Core/ChangeLog 2016-09-27 01:12:58 UTC (rev 206407)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-09-27 02:46:19 UTC (rev 206408)
@@ -1,3 +1,17 @@
+2016-09-26 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r206405.
+ https://bugs.webkit.org/show_bug.cgi?id=162588
+
+ This change caused LayoutTest crashes. (Requested by
+ ryanhaddad on #webkit).
+
+ Reverted changeset:
+
+ "Add some needed CatchScopes in code that should not throw."
+ https://bugs.webkit.org/show_bug.cgi?id=162584
+ http://trac.webkit.org/changeset/206405
+
2016-09-26 Mark Lam <[email protected]>
Add some needed CatchScopes in code that should not throw.
Modified: trunk/Source/_javascript_Core/interpreter/Interpreter.cpp (206407 => 206408)
--- trunk/Source/_javascript_Core/interpreter/Interpreter.cpp 2016-09-27 01:12:58 UTC (rev 206407)
+++ trunk/Source/_javascript_Core/interpreter/Interpreter.cpp 2016-09-27 02:46:19 UTC (rev 206408)
@@ -583,7 +583,7 @@
ALWAYS_INLINE static void notifyDebuggerOfUnwinding(CallFrame* callFrame)
{
VM& vm = callFrame->vm();
- auto catchScope = DECLARE_CATCH_SCOPE(vm);
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
if (Debugger* debugger = callFrame->vmEntryGlobalObject()->debugger()) {
SuspendExceptionScope scope(&vm);
if (jsDynamicCast<JSFunction*>(callFrame->callee()))
@@ -590,7 +590,7 @@
debugger->returnEvent(callFrame);
else
debugger->didExecuteProgram(callFrame);
- ASSERT_UNUSED(catchScope, !catchScope.exception());
+ ASSERT_UNUSED(throwScope, !throwScope.exception());
}
}
Modified: trunk/Source/_javascript_Core/jsc.cpp (206407 => 206408)
--- trunk/Source/_javascript_Core/jsc.cpp 2016-09-27 01:12:58 UTC (rev 206407)
+++ trunk/Source/_javascript_Core/jsc.cpp 2016-09-27 02:46:19 UTC (rev 206408)
@@ -2539,7 +2539,6 @@
static int NEVER_INLINE runJSC(VM* vm, CommandLine options)
{
JSLockHolder locker(vm);
- auto scope = DECLARE_CATCH_SCOPE(*vm);
int result;
if (options.m_profile && !vm->m_perBytecodeProfiler)
@@ -2546,8 +2545,6 @@
vm->m_perBytecodeProfiler = std::make_unique<Profiler::Database>(*vm);
GlobalObject* globalObject = GlobalObject::create(*vm, GlobalObject::createStructure(*vm, jsNull()), options.m_arguments);
- RETURN_IF_EXCEPTION(scope, 3);
-
bool success = runWithScripts(globalObject, options.m_scripts, options.m_uncaughtExceptionName, options.m_alwaysDumpUncaughtException, options.m_dump, options.m_module);
if (options.m_interactive && success)
runInteractive(globalObject);
Modified: trunk/Source/_javascript_Core/profiler/ProfilerDatabase.cpp (206407 => 206408)
--- trunk/Source/_javascript_Core/profiler/ProfilerDatabase.cpp 2016-09-27 01:12:58 UTC (rev 206407)
+++ trunk/Source/_javascript_Core/profiler/ProfilerDatabase.cpp 2016-09-27 02:46:19 UTC (rev 206408)
@@ -134,17 +134,11 @@
bool Database::save(const char* filename) const
{
- auto scope = DECLARE_CATCH_SCOPE(m_vm);
auto out = FilePrintStream::open(filename, "w");
if (!out)
return false;
- String data = ""
- if (UNLIKELY(scope.exception())) {
- scope.clearException();
- return false;
- }
- out->print(data);
+ out->print(toJSON());
return true;
}
Modified: trunk/Source/_javascript_Core/runtime/ExceptionHelpers.cpp (206407 => 206408)
--- trunk/Source/_javascript_Core/runtime/ExceptionHelpers.cpp 2016-09-27 01:12:58 UTC (rev 206407)
+++ trunk/Source/_javascript_Core/runtime/ExceptionHelpers.cpp 2016-09-27 02:46:19 UTC (rev 206408)
@@ -236,14 +236,7 @@
JSObject* createError(ExecState* exec, JSValue value, const String& message, ErrorInstance::SourceAppender appender)
{
- VM& vm = exec->vm();
- auto scope = DECLARE_CATCH_SCOPE(vm);
-
String errorMessage = makeString(errorDescriptionForValue(exec, value)->value(exec), ' ', message);
- if (UNLIKELY(scope.exception())) {
- scope.clearException();
- errorMessage = message;
- }
JSObject* exception = createTypeError(exec, errorMessage, appender, runtimeTypeForValue(value));
ASSERT(exception->isErrorInstance());
return exception;
Modified: trunk/Source/_javascript_Core/runtime/JSModuleLoader.cpp (206407 => 206408)
--- trunk/Source/_javascript_Core/runtime/JSModuleLoader.cpp 2016-09-27 01:12:58 UTC (rev 206407)
+++ trunk/Source/_javascript_Core/runtime/JSModuleLoader.cpp 2016-09-27 02:46:19 UTC (rev 206408)
@@ -57,10 +57,9 @@
void JSModuleLoader::finishCreation(ExecState* exec, VM& vm, JSGlobalObject* globalObject)
{
- auto scope = DECLARE_CATCH_SCOPE(vm);
-
Base::finishCreation(vm);
ASSERT(inherits(info()));
+ auto scope = DECLARE_THROW_SCOPE(vm);
JSMap* map = JSMap::create(exec, vm, globalObject->mapStructure());
RELEASE_ASSERT(!scope.exception());
putDirect(vm, Identifier::fromString(&vm, "registry"), map);
Modified: trunk/Source/_javascript_Core/runtime/SamplingProfiler.cpp (206407 => 206408)
--- trunk/Source/_javascript_Core/runtime/SamplingProfiler.cpp 2016-09-27 01:12:58 UTC (rev 206407)
+++ trunk/Source/_javascript_Core/runtime/SamplingProfiler.cpp 2016-09-27 02:46:19 UTC (rev 206408)
@@ -591,14 +591,11 @@
if (!callee)
return String();
- auto scope = DECLARE_CATCH_SCOPE(vm);
ExecState* exec = callee->globalObject()->globalExec();
auto getPropertyIfPureOperation = [&] (const Identifier& ident) -> String {
PropertySlot slot(callee, PropertySlot::InternalMethodType::VMInquiry);
PropertyName propertyName(ident);
- bool hasProperty = callee->getPropertySlot(exec, propertyName, slot);
- ASSERT_UNUSED(scope, !scope.exception());
- if (hasProperty) {
+ if (callee->getPropertySlot(exec, propertyName, slot)) {
if (slot.isValue()) {
JSValue nameValue = slot.getValue(exec, propertyName);
if (isJSString(nameValue))