Diff
Modified: trunk/Source/_javascript_Core/API/glib/JSCCallbackFunction.cpp (229799 => 229800)
--- trunk/Source/_javascript_Core/API/glib/JSCCallbackFunction.cpp 2018-03-21 08:44:03 UTC (rev 229799)
+++ trunk/Source/_javascript_Core/API/glib/JSCCallbackFunction.cpp 2018-03-21 08:53:03 UTC (rev 229800)
@@ -69,7 +69,7 @@
, m_returnType(returnType)
, m_parameters(WTFMove(parameters))
{
- RELEASE_ASSERT(type != Type::Constructor || jscClass);
+ ASSERT(type != Type::Constructor || jscClass);
if (G_CLOSURE_NEEDS_MARSHAL(m_closure.get()))
g_closure_set_marshal(m_closure.get(), g_cclosure_marshal_generic);
}
Modified: trunk/Source/_javascript_Core/API/glib/JSCContext.cpp (229799 => 229800)
--- trunk/Source/_javascript_Core/API/glib/JSCContext.cpp 2018-03-21 08:44:03 UTC (rev 229799)
+++ trunk/Source/_javascript_Core/API/glib/JSCContext.cpp 2018-03-21 08:53:03 UTC (rev 229800)
@@ -93,9 +93,9 @@
{
JSCContextPrivate* priv = context->priv;
if (vm) {
- RELEASE_ASSERT(!priv->vm);
+ ASSERT(!priv->vm);
priv->vm = WTFMove(vm);
- RELEASE_ASSERT(!priv->jsContext);
+ ASSERT(!priv->jsContext);
GUniquePtr<char> name(g_strdup_printf("%p-jsContext", &Thread::current()));
if (auto* data = "" name.get())) {
priv->jsContext = static_cast<JSGlobalContextRef>(data);
@@ -107,7 +107,7 @@
globalObject->setWrapperMap(std::make_unique<JSC::WrapperMap>(priv->jsContext.get()));
jscVirtualMachineAddContext(priv->vm.get(), context);
} else if (priv->vm) {
- RELEASE_ASSERT(priv->jsContext);
+ ASSERT(priv->jsContext);
jscVirtualMachineRemoveContext(priv->vm.get(), context);
priv->jsContext = nullptr;
priv->vm = nullptr;
@@ -198,7 +198,7 @@
JSGlobalContextRef jscContextGetJSContext(JSCContext* context)
{
- ASSERT(JSC_IS_CONTET(context));
+ ASSERT(JSC_IS_CONTEXT(context));
JSCContextPrivate* priv = context->priv;
return priv->jsContext.get();
@@ -207,7 +207,7 @@
static JSC::WrapperMap& wrapperMap(JSCContext* context)
{
auto* map = toJSGlobalObject(context->priv->jsContext.get())->wrapperMap();
- RELEASE_ASSERT(map);
+ ASSERT(map);
return *map;
}
@@ -641,7 +641,7 @@
return false;
auto exception = jscExceptionCreate(context, jsException);
- RELEASE_ASSERT(!context->priv->exceptionHandlers.isEmpty());
+ ASSERT(!context->priv->exceptionHandlers.isEmpty());
const auto& exceptionHandler = context->priv->exceptionHandlers.last();
exceptionHandler.handler(context, exception.get(), exceptionHandler.userData);
Modified: trunk/Source/_javascript_Core/API/glib/JSCValue.cpp (229799 => 229800)
--- trunk/Source/_javascript_Core/API/glib/JSCValue.cpp 2018-03-21 08:44:03 UTC (rev 229799)
+++ trunk/Source/_javascript_Core/API/glib/JSCValue.cpp 2018-03-21 08:53:03 UTC (rev 229800)
@@ -697,7 +697,7 @@
result = JSObjectCallAsConstructor(jsContext, function, arguments.size(), arguments.data(), &exception);
break;
case JSC::JSCCallbackFunction::Type::Method:
- RELEASE_ASSERT(thisObject);
+ ASSERT(thisObject);
FALLTHROUGH;
case JSC::JSCCallbackFunction::Type::Function:
result = JSObjectCallAsFunction(jsContext, function, thisObject, arguments.size(), arguments.data(), &exception);
Modified: trunk/Source/_javascript_Core/API/glib/JSCVirtualMachine.cpp (229799 => 229800)
--- trunk/Source/_javascript_Core/API/glib/JSCVirtualMachine.cpp 2018-03-21 08:44:03 UTC (rev 229799)
+++ trunk/Source/_javascript_Core/API/glib/JSCVirtualMachine.cpp 2018-03-21 08:53:03 UTC (rev 229800)
@@ -58,7 +58,7 @@
static void addWrapper(JSContextGroupRef group, JSCVirtualMachine* vm)
{
std::lock_guard<StaticLock> lock(wrapperCacheMutex);
- RELEASE_ASSERT(!wrapperMap().contains(group));
+ ASSERT(!wrapperMap().contains(group));
wrapperMap().set(group, vm);
}
@@ -65,7 +65,7 @@
static void removeWrapper(JSContextGroupRef group)
{
std::lock_guard<StaticLock> lock(wrapperCacheMutex);
- RELEASE_ASSERT(wrapperMap().contains(group));
+ ASSERT(wrapperMap().contains(group));
wrapperMap().remove(group);
}
@@ -72,7 +72,7 @@
static void jscVirtualMachineSetContextGroup(JSCVirtualMachine *vm, JSContextGroupRef group)
{
if (group) {
- RELEASE_ASSERT(!vm->priv->jsContextGroup);
+ ASSERT(!vm->priv->jsContextGroup);
vm->priv->jsContextGroup = group;
JSContextGroupRetain(vm->priv->jsContextGroup);
addWrapper(vm->priv->jsContextGroup, vm);
@@ -125,19 +125,19 @@
void jscVirtualMachineAddContext(JSCVirtualMachine* vm, JSCContext* context)
{
- RELEASE_ASSERT(vm->priv->jsContextGroup);
+ ASSERT(vm->priv->jsContextGroup);
auto jsContext = jscContextGetJSContext(context);
- RELEASE_ASSERT(JSContextGetGroup(jsContext) == vm->priv->jsContextGroup);
- RELEASE_ASSERT(!vm->priv->contextCache.contains(jsContext));
+ ASSERT(JSContextGetGroup(jsContext) == vm->priv->jsContextGroup);
+ ASSERT(!vm->priv->contextCache.contains(jsContext));
vm->priv->contextCache.set(jsContext, context);
}
void jscVirtualMachineRemoveContext(JSCVirtualMachine* vm, JSCContext* context)
{
- RELEASE_ASSERT(vm->priv->jsContextGroup);
+ ASSERT(vm->priv->jsContextGroup);
auto jsContext = jscContextGetJSContext(context);
- RELEASE_ASSERT(JSContextGetGroup(jsContext) == vm->priv->jsContextGroup);
- RELEASE_ASSERT(vm->priv->contextCache.contains(jsContext));
+ ASSERT(JSContextGetGroup(jsContext) == vm->priv->jsContextGroup);
+ ASSERT(vm->priv->contextCache.contains(jsContext));
vm->priv->contextCache.remove(jsContext);
}
Modified: trunk/Source/_javascript_Core/API/glib/JSCWrapperMap.cpp (229799 => 229800)
--- trunk/Source/_javascript_Core/API/glib/JSCWrapperMap.cpp 2018-03-21 08:44:03 UTC (rev 229799)
+++ trunk/Source/_javascript_Core/API/glib/JSCWrapperMap.cpp 2018-03-21 08:53:03 UTC (rev 229800)
@@ -46,7 +46,7 @@
{
auto* jsContext = jscContextGetJSContext(jscContext);
JSC::JSLockHolder locker(toJS(jsContext));
- RELEASE_ASSERT(toJSGlobalObject(jsContext)->wrapperMap() == this);
+ ASSERT(toJSGlobalObject(jsContext)->wrapperMap() == this);
GRefPtr<JSCValue> value = m_cachedGObjectWrappers.get(jsValue);
if (!value) {
value = adoptGRef(jscValueCreate(jscContext, jsValue));
@@ -57,7 +57,7 @@
void WrapperMap::unwrap(JSValueRef jsValue)
{
- RELEASE_ASSERT(m_cachedGObjectWrappers.contains(jsValue));
+ ASSERT(m_cachedGObjectWrappers.contains(jsValue));
m_cachedGObjectWrappers.remove(jsValue);
}
@@ -64,13 +64,13 @@
void WrapperMap::registerClass(JSCClass* jscClass)
{
auto* jsClass = jscClassGetJSClass(jscClass);
- RELEASE_ASSERT(!m_classMap.contains(jsClass));
+ ASSERT(!m_classMap.contains(jsClass));
m_classMap.set(jsClass, jscClass);
}
JSObject* WrapperMap::createJSWrappper(JSGlobalContextRef jsContext, JSClassRef jsClass, JSValueRef prototype, gpointer wrappedObject, GDestroyNotify destroyFunction)
{
- RELEASE_ASSERT(toJSGlobalObject(jsContext)->wrapperMap() == this);
+ ASSERT(toJSGlobalObject(jsContext)->wrapperMap() == this);
ExecState* exec = toJS(jsContext);
VM& vm = exec->vm();
JSLockHolder locker(vm);
@@ -95,7 +95,7 @@
gpointer WrapperMap::wrappedObject(JSGlobalContextRef jsContext, JSObjectRef jsObject) const
{
- RELEASE_ASSERT(toJSGlobalObject(jsContext)->wrapperMap() == this);
+ ASSERT(toJSGlobalObject(jsContext)->wrapperMap() == this);
JSLockHolder locker(toJS(jsContext));
VM& vm = toJS(jsContext)->vm();
auto* object = toJS(jsObject);
Modified: trunk/Source/_javascript_Core/ChangeLog (229799 => 229800)
--- trunk/Source/_javascript_Core/ChangeLog 2018-03-21 08:44:03 UTC (rev 229799)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-03-21 08:53:03 UTC (rev 229800)
@@ -1,5 +1,33 @@
2018-03-21 Carlos Garcia Campos <[email protected]>
+ Unreviewed. Fix GTK and WPE debug build after r229798.
+
+ Fix a typo in an ASSERT. Also convert several RELEASE_ASSERT to ASSERT that I forgot to do before landing.
+
+ * API/glib/JSCCallbackFunction.cpp:
+ (JSC::JSCCallbackFunction::JSCCallbackFunction):
+ * API/glib/JSCContext.cpp:
+ (jscContextSetVirtualMachine):
+ (jscContextGetJSContext):
+ (wrapperMap):
+ (jscContextHandleExceptionIfNeeded):
+ * API/glib/JSCValue.cpp:
+ (jscValueCallFunction):
+ * API/glib/JSCVirtualMachine.cpp:
+ (addWrapper):
+ (removeWrapper):
+ (jscVirtualMachineSetContextGroup):
+ (jscVirtualMachineAddContext):
+ (jscVirtualMachineRemoveContext):
+ * API/glib/JSCWrapperMap.cpp:
+ (JSC::WrapperMap::gobjectWrapper):
+ (JSC::WrapperMap::unwrap):
+ (JSC::WrapperMap::registerClass):
+ (JSC::WrapperMap::createJSWrappper):
+ (JSC::WrapperMap::wrappedObject const):
+
+2018-03-21 Carlos Garcia Campos <[email protected]>
+
[GTK][WPE] JSC bindings not introspectable
https://bugs.webkit.org/show_bug.cgi?id=136989