[Webkit-unassigned] [Bug 20023] New: Failed assertion in PropertyNameArray.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jul 12 14:36:01 PDT 2008


           Summary: Failed assertion in PropertyNameArray.cpp
           Product: WebKit
           Version: 526+ (Nightly build)
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: david.hansen at gmx.net

Just run this little test:

ASSERTION FAILED: identifier == &UString::Rep::null || identifier ==
&UString::Rep::empty || identifier->identifierTable
(JavaScriptCore/kjs/PropertyNameArray.cpp:30 void

#include <stdlib.h>
#include <stdbool.h>
#include <JavaScriptCore/JavaScript.h>

static bool
has_prop (JSContextRef jsCtx, JSObjectRef jsObj, JSStringRef jsName)
  if (JSStringIsEqualToUTF8CString (jsName, "fourtyTwo"))
    return true;

  return false;

static JSValueRef
get_prop (JSContextRef jsCtx, JSObjectRef jsObj,
          JSStringRef jsName, JSValueRef *jsExn)
  return JSValueMakeNumber (jsCtx, 42.0);

static void
get_prop_names (JSContextRef jsCtx, JSObjectRef jsObj,
                JSPropertyNameAccumulatorRef jsNames)
  JSStringRef jsStr = JSStringCreateWithUTF8CString ("fourtyTwo");

  JSPropertyNameAccumulatorAddName (jsNames, jsStr);
  JSStringRelease (jsStr);

main (void)
  JSClassDefinition  cdef = kJSClassDefinitionEmpty;
  JSClassRef         jsClass;
  JSGlobalContextRef jsCtx;
  JSStringRef        jsScript;

  jsScript = JSStringCreateWithUTF8CString ("var a = [];"
                                            "for (i in this) { a.push[i]; }");

  cdef.className        = "Foo";
  cdef.hasProperty      = has_prop;
  cdef.getProperty      = get_prop;
  cdef.getPropertyNames = get_prop_names;

  jsClass = JSClassCreate (&cdef);
  jsCtx   = JSGlobalContextCreate (jsClass);

  /* Boom!  */
  JSEvaluateScript (jsCtx, jsScript, NULL, NULL, 0, NULL);

  return EXIT_SUCCESS;

  Local Variables:
  compile-command: "gcc -g -ggdb -O0 -W -Wall \
    `pkg-config --cflags --libs webkit-1.0`   \
    jsaccum.c -o jsaccum"

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list