commit | 025423a270d8dd93360cc336cf310d794f787e85 | [log] [tgz] |
---|---|---|
author | ggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Wed Feb 19 23:51:34 2014 +0000 |
committer | ggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Wed Feb 19 23:51:34 2014 +0000 |
tree | f3cee9c3924af8cb37ee82a9622211e042a7c776 | |
parent | ceeebf9216bcc1dbf983a6ca92613da8228d19e4 [diff] [blame] |
Crash after -[JSContext evaluateScript:] when initializing JSContext with JSVirtualMachine https://bugs.webkit.org/show_bug.cgi?id=129070 Reviewed by Mark Hahnenberg. Clear our exception explicitly before throwing away the VM because our exception references VM memory. * API/JSContext.mm: (-[JSContext dealloc]): * API/tests/testapi.mm: (testObjectiveCAPI): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/API/JSContext.mm b/Source/JavaScriptCore/API/JSContext.mm index 1af4b7b..ebe0f0c 100644 --- a/Source/JavaScriptCore/API/JSContext.mm +++ b/Source/JavaScriptCore/API/JSContext.mm
@@ -80,6 +80,7 @@ - (void)dealloc { + m_exception.clear(); [m_wrapperMap release]; JSGlobalContextRelease(m_context); [m_virtualMachine release];