[Webkit-unassigned] [Bug 122124] New: Assertion failure under -[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:] if no classes conform to JSExport
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 30 14:35:55 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=122124
Summary: Assertion failure under -[JSObjCClassInfo
allocateConstructorAndPrototypeWithSuperClassInfo:] if
no classes conform to JSExport
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Keywords: InRadar
Severity: Normal
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: mitz at webkit.org
CC: mhahnenberg at apple.com
<rdar://problem/15114974>
Defining an NSBlock-valued property on a JSValue in a program that doesn’t load any classes that conform to JSExport causes an assertion failure.
To reproduce, build and run this:
#import <JavaScriptCore/JavaScriptCore.h>
int main(int argc, const char * argv[])
{
@autoreleasepool {
JSContext *context = [[JSContext alloc] init];
[[context globalObject] defineProperty:@"doSomething" descriptor:@{
JSPropertyDescriptorValueKey : ^{ }
}];
}
return 0;
}
* RESULTS
ASSERTION FAILED: target
Source/JavaScriptCore/API/ObjcRuntimeExtras.h(47) : void forEachProtocolImplementingProtocol(Class, Protocol *, void (^)(Protocol *))
1 0x1005d66f0 WTFCrash
2 0x1004120d0 forEachProtocolImplementingProtocol(objc_class*, Protocol*, void (Protocol*) block_pointer)
3 0x10040e92b -[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]
4 0x10040e0ab -[JSObjCClassInfo initWithContext:forClass:superClassInfo:]
5 0x10040ff2d -[JSWrapperMap classInfoForClass:]
6 0x10040fe5e -[JSWrapperMap classInfoForClass:]
7 0x10040fe5e -[JSWrapperMap classInfoForClass:]
8 0x10041008b -[JSWrapperMap jsWrapperForObject:]
9 0x100373d57 -[JSContext(Internal) wrapperForObjCObject:]
10 0x1003f868e objectToValueWithoutCopy(JSContext*, objc_object*)
11 0x1003f7ddf ObjcContainerConvertor::convert(objc_object*)
12 0x1003f3435 objectToValue(JSContext*, objc_object*)
13 0x1003f6016 -[JSValue invokeMethod:withArguments:]
14 0x1003f51d1 -[JSValue defineProperty:descriptor:]
15 0x100000e1f main
16 0x7fff878195fd start
* NOTES
This happens because objc_getProtocol("JSExport") returns nil. Note that getJSExportProtocol() caches this result, which means that if a class that conforms to JSExport is loaded (or registered dynamically) later, getJSExportProtocol() would still return nil. This seems like an actual correctness issue in production builds.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list