Red box c++ exceptions thrown while executing sync hooks

Summary: Also adds support for creating JS Error objects. When we clean up the way global functions are installed on JSC, we'll be able to use this pattern to auto-catch all c++ exceptions at this level.

Reviewed By: lexs

Differential Revision: D3276663

fbshipit-source-id: bf3561690013019a25e2be5a4d1b69ba9e002c72
This commit is contained in:
Andy Street
2016-05-10 05:02:56 -07:00
committed by Facebook Github Bot 3
parent ca1caf2713
commit 6ec5b953cb
5 changed files with 52 additions and 6 deletions

View File

@@ -13,6 +13,12 @@ Value::Value(JSContextRef context, JSValueRef value) :
{
}
Value::Value(JSContextRef context, JSStringRef str) :
m_context(context),
m_value(JSValueMakeString(context, str))
{
}
Value::Value(Value&& other) :
m_context(other.m_context),
m_value(other.m_value)