mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-14 10:43:50 +00:00
Fixed: When creating a method the function name can't start with '0_'
This commit is contained in:
1 parent
3f8821b43b
commit
8257632706
1 file changed
+1
-1
@@ -81,7 +81,7 @@ GLOBAL(objj_class) = function(displayName)
|
||||
#if DEBUG
|
||||
// Naming the allocator allows the WebKit heap snapshot tool to display object class names correctly
|
||||
// HACK: displayName property is not respected so we must eval a function to name it
|
||||
eval("this.allocator = function " + (displayName || "OBJJ_OBJECT").replace(/\W/g, "_") + "() { }");
|
||||
eval("this.allocator = function " + (displayName ? displayName.replace(/^0|\W/g, "_") : "OBJJ_OBJECT") + "() { }");
|
||||
#else
|
||||
this.allocator = function() { };
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user