[Webkit-unassigned] [Bug 133858] New: REGRESSION: global object with custom class in iOS 8.0 or OS X 10.10

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 13 08:26:32 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=133858

           Summary: REGRESSION: global object with custom class in iOS 8.0
                    or OS X 10.10
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: isaacburns at gmail.com


The following code identifies a regression in the iOS SDK 8.0 and OS X SDK 10.10.

JSContextGetGlobalObject no longer returns the object with the custom class.

This may be related to the following bugs.
https://bugs.webkit.org/show_bug.cgi?id=133531
https://bugs.webkit.org/show_bug.cgi?id=133532

#include <JavaScriptCore/JavaScriptCore.h>

static bool _hasProperty(JSContextRef js_ctx, JSObjectRef js_object, JSStringRef js_name)
{
    // iOS SDK 7.1 and OS X SDK 10.9: PASS, iOS SDK 8.0 and OS X SDK 10.10: FAIL
    assert(JSValueIsStrictEqual(js_ctx, js_object, JSContextGetGlobalObject(js_ctx)));
    return false;
}

int main(int argc, char * argv[])
{
    JSClassDefinition js_class_def = kJSClassDefinitionEmpty;
    js_class_def.hasProperty = _hasProperty;
    JSClassRef js_class = JSClassCreate(&js_class_def);
    JSGlobalContextRef js_ctx = JSGlobalContextCreate(js_class);
    // iOS SDK 7.1 and OS X SDK 10.9: PASS, iOS SDK 8.0 and OS X SDK 10.10: FAIL
    assert(JSValueIsObjectOfClass(js_ctx, JSContextGetGlobalObject(js_ctx), js_class));
    JSStringRef js_name = JSStringCreateWithUTF8CString("Object");
    assert(JSObjectHasProperty(js_ctx, JSContextGetGlobalObject(js_ctx), js_name));
    JSStringRelease(js_name); js_name = NULL;
    JSGlobalContextRelease(js_ctx); js_ctx = NULL;
    JSClassRelease(js_class); js_class = NULL;
    return 0;
}

-- 
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