summaryrefslogtreecommitdiffstats
path: root/JavaScriptGlue
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptGlue')
-rw-r--r--JavaScriptGlue/ChangeLog782
-rw-r--r--JavaScriptGlue/Configurations/Base.xcconfig25
-rw-r--r--JavaScriptGlue/Configurations/DebugRelease.xcconfig9
-rw-r--r--JavaScriptGlue/Configurations/JavaScriptGlue.xcconfig2
-rw-r--r--JavaScriptGlue/Configurations/Version.xcconfig25
-rw-r--r--JavaScriptGlue/ForwardingHeaders/kjs/value.h1
-rw-r--r--JavaScriptGlue/ForwardingHeaders/masm/X86Assembler.h1
-rw-r--r--JavaScriptGlue/ForwardingHeaders/profiler/Profiler.h1
-rw-r--r--JavaScriptGlue/ForwardingHeaders/runtime/ExecState.h (renamed from JavaScriptGlue/ForwardingHeaders/kjs/ExecState.h)0
-rw-r--r--JavaScriptGlue/ForwardingHeaders/wtf/HashFunctions.h1
-rw-r--r--JavaScriptGlue/ForwardingHeaders/wtf/HashMap.h1
-rw-r--r--JavaScriptGlue/ForwardingHeaders/wtf/HashTraits.h1
-rw-r--r--JavaScriptGlue/ForwardingHeaders/wtf/ListRefPtr.h1
-rw-r--r--JavaScriptGlue/ForwardingHeaders/wtf/Locker.h1
-rw-r--r--JavaScriptGlue/ForwardingHeaders/wtf/NotFound.h1
-rw-r--r--JavaScriptGlue/ForwardingHeaders/wtf/ThreadSpecific.h1
-rw-r--r--JavaScriptGlue/ForwardingHeaders/wtf/Threading.h1
-rw-r--r--JavaScriptGlue/ForwardingHeaders/wtf/UnusedParam.h1
-rw-r--r--JavaScriptGlue/Info.plist2
-rw-r--r--JavaScriptGlue/JSBase.cpp2
-rw-r--r--JavaScriptGlue/JSObject.cpp15
-rw-r--r--JavaScriptGlue/JSObject.h8
-rw-r--r--JavaScriptGlue/JSRun.cpp19
-rw-r--r--JavaScriptGlue/JSRun.h14
-rw-r--r--JavaScriptGlue/JSUtils.cpp131
-rw-r--r--JavaScriptGlue/JSUtils.h18
-rw-r--r--JavaScriptGlue/JSValueWrapper.cpp83
-rw-r--r--JavaScriptGlue/JSValueWrapper.h4
-rw-r--r--JavaScriptGlue/JavaScriptGlue.cpp26
-rw-r--r--JavaScriptGlue/JavaScriptGlue.xcodeproj/project.pbxproj83
-rw-r--r--JavaScriptGlue/UserObjectImp.cpp49
-rw-r--r--JavaScriptGlue/UserObjectImp.h24
-rw-r--r--JavaScriptGlue/config.h2
-rw-r--r--JavaScriptGlue/icu/unicode/utf_old.h1
34 files changed, 1095 insertions, 241 deletions
diff --git a/JavaScriptGlue/ChangeLog b/JavaScriptGlue/ChangeLog
index 31380fa..cb8a368 100644
--- a/JavaScriptGlue/ChangeLog
+++ b/JavaScriptGlue/ChangeLog
@@ -1,3 +1,765 @@
+2008-11-04 Cameron Zwarich <zwarich@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Remove JavaScriptGlue forwarding headers that are no longer necessary,
+ and correct the path of the ExecState.h forwarding header.
+
+ * ForwardingHeaders/kjs: Removed.
+ * ForwardingHeaders/kjs/CTI.h: Removed.
+ * ForwardingHeaders/kjs/ExecState.h: Removed.
+ * ForwardingHeaders/kjs/JSValue.h: Removed.
+ * ForwardingHeaders/kjs/PutPropertySlot.h: Removed.
+ * ForwardingHeaders/kjs/ustring.h: Removed.
+ * ForwardingHeaders/runtime: Added.
+ * ForwardingHeaders/runtime/ExecState.h: Copied from ForwardingHeaders/kjs/ExecState.h.
+ * config.h:
+
+2008-10-31 Stephanie Lewis <slewis@apple.com>
+
+ Fix build by including right files.
+
+ * JSRun.cpp:
+
+2008-10-30 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Jon Homeycutt.
+
+ Explicitly default to building for only the native architecture in debug and release builds.
+
+ * Configurations/DebugRelease.xcconfig:
+
+2008-10-24 Darin Adler <darin@apple.com>
+
+ - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732
+
+ * JSObject.cpp:
+ (nativeCallFunction):
+ * JSUtils.cpp:
+ (KJSValueToJSObject):
+ (JSObjectKJSValue):
+ (KJSValueToCFTypeInternal):
+ (KJSValueToCFType):
+ * JSUtils.h:
+ * JSValueWrapper.cpp:
+ (JSValueWrapper::JSValueWrapper):
+ (JSValueWrapper::GetValue):
+ (JSValueWrapper::JSObjectCopyProperty):
+ (JSValueWrapper::JSObjectSetProperty):
+ (JSValueWrapper::JSObjectCallFunction):
+ * JSValueWrapper.h:
+ * UserObjectImp.cpp:
+ (UserObjectImp::callAsFunction):
+ (UserObjectImp::userObjectGetter):
+ (UserObjectImp::getOwnPropertySlot):
+ (UserObjectImp::put):
+ (UserObjectImp::toPrimitive):
+ * UserObjectImp.h:
+ (UserObjectImp::createStructureID):
+ Use JSValue* instead of JSValuePtr.
+
+2008-10-23 Darin Adler <darin@apple.com>
+
+ - roll out https://bugs.webkit.org/show_bug.cgi?id=21732
+
+ * JSValueWrapper.cpp:
+ (JSValueWrapper::GetValue): Added missing call to .get().
+ * JSValueWrapper.h: ProtectedPtr<JSValue> instead of ProtectedPtr<JSValuePtr>.
+
+2008-10-22 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ - fix https://bugs.webkit.org/show_bug.cgi?id=21294
+ Bug 21294: Devirtualize getOwnPropertySlot()
+
+ * JSRun.cpp:
+ (JSGlueGlobalObject::JSGlueGlobalObject): Moved constructor here.
+ Set up flags in its new location in global object data, and set up
+ a structure for UserObjectImp too.
+ (JSRun::JSRun): Added code to give the JSGlueGlobalObject its own unique
+ structure, rather than using the default one from JSGlobalObject.
+
+ * JSRun.h: Made JSGlueGlobalObject take a structure ID. Also moved
+ the data into a separate data object. And added userObjectStructure,
+ a Structure to be used by UserObjectImp.
+
+ * JSUtils.cpp: Removed unused sharedGlobalData global.
+ (JSObjectKJSValue): Pass Structure in when creating UserObjectImp.
+ (unprotectGlobalObject): Use JSGlueGLobalObject type specifically.
+ (initializeGlobalObjectKey): Removed code to set up unused sharedGlobalData.
+ (getThreadGlobalObject): Added. Shared by JSObjectKJSValue and
+ getThreadGlobalExecState. Also now passes in a structure ID when creating
+ the global object.
+ (getThreadGlobalExecState): Changed to call getThreadGlobalObject.
+
+ * UserObjectImp.cpp:
+ (UserObjectImp::UserObjectImp): Changed to take a structure.
+ * UserObjectImp.h:
+ (UserObjectImp::createStructureID): Added. Returns a structure without
+ HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.
+
+2008-10-20 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Cameron Zwarich.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=21766
+ REGRESSION: 12 JSC tests fail
+
+ The JSGlobalObject constructor no longer takes a JSGlobalData
+ as an argument.
+
+ * JSRun.cpp:
+ (JSRun::JSRun):
+ * JSRun.h:
+ (JSGlueGlobalObject::JSGlueGlobalObject):
+ * JSUtils.cpp:
+ (getThreadGlobalExecState):
+
+2008-10-19 Darin Adler <darin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
+ improve performance by eliminating JSValue as a base class for JSCell
+
+ Remove most uses of JSValue, which will be removed in a future patch.
+
+ * JSValueWrapper.h: Use JSValuePtr instead of JSValue*.
+
+2008-10-18 Darin Adler <darin@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
+ improve performance by eliminating JSValue as a base class for JSCell
+
+ Tweak a little more to get closer to where we can make JSValuePtr a class.
+
+ * JSObject.cpp:
+ (nativeCallFunction): Call asObject.
+
+ * JSUtils.cpp:
+ (KJSValueToJSObject): Use JSValuePtr and asObject.
+ (JSObjectKJSValue): Ditto.
+ (KJSValueToCFTypeInternal): Ditto.
+ (KJSValueToCFType): Ditto.
+ * JSUtils.h: Ditto.
+
+ * UserObjectImp.cpp:
+ (UserObjectImp::callAsFunction): Use JSValuePtr and asObject.
+ (UserObjectImp::userObjectGetter): Ditto.
+ (UserObjectImp::getOwnPropertySlot): Ditto.
+ (UserObjectImp::put): Ditto.
+ (UserObjectImp::toPrimitive): Ditto.
+ * UserObjectImp.h: Ditto.
+
+2008-10-18 Darin Adler <darin@apple.com>
+
+ Reviewed by Cameron Zwarich.
+
+ - next step on https://bugs.webkit.org/show_bug.cgi?id=21732
+ improve performance by eliminating JSValue as a base class for JSCell
+
+ Use JSValuePtr everywhere instead of JSValue*. In the future, we'll be
+ changing JSValuePtr to be a class, and then eventually renaming it
+ to JSValue once that's done.
+
+ * JSObject.cpp:
+ * JSValueWrapper.cpp:
+ * UserObjectImp.cpp:
+ * UserObjectImp.h:
+ Replace JSValue* with JSValuePtr.
+
+2008-10-13 Maciej Stachowiak <mjs@apple.com>
+
+ Rubber stamped by Mark Rowe.
+
+ - use gcc 4.2 when building with Xcode 3.1 or newer on Leopard, even though this is not the default
+
+ * Configurations/DebugRelease.xcconfig:
+
+2008-10-06 Maciej Stachowiak <mjs@apple.com>
+
+ Not reviewed. Build fix.
+
+ - revert toBoolean changes (r37333 and r37335); need to make WebCore work with these
+
+ * JSUtils.cpp:
+ (KJSValueToCFTypeInternal):
+
+2008-10-06 Maciej Stachowiak <mjs@apple.com>
+
+ Not reviewed.
+
+ - fix build; toBoolean no longer takes an ExecState
+
+ * JSUtils.cpp:
+ (KJSValueToCFTypeInternal):
+
+2008-10-04 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Add a 'Check For Weak VTables' build phase to catch weak vtables as early as possible.
+
+ * JavaScriptGlue.xcodeproj/project.pbxproj:
+
+2008-10-01 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler and Cameron Zwarich.
+
+ * JSRun.cpp:
+ (JSRun::Evaluate):
+ (JSRun::CheckSyntax): Provide a SourceCode to the Interpreter, since
+ other APIs are no longer supported.
+
+2008-09-29 Geoffrey Garen <ggaren@apple.com>
+
+ Not reviewed.
+
+ Forwarding headers to fix the build.
+
+ * ForwardingHeaders/kjs/CTI.h: Copied from ForwardingHeaders/kjs/ExecState.h.
+ * ForwardingHeaders/kjs/ustring.h: Copied from ForwardingHeaders/kjs/ExecState.h.
+ * ForwardingHeaders/masm: Added.
+ * ForwardingHeaders/masm/X86Assembler.h: Added.
+ * ForwardingHeaders/profiler: Added.
+ * ForwardingHeaders/profiler/Profiler.h: Added.
+
+2008-09-08 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Maciej Stachowiak and Oliver Hunt.
+
+ Add forwarding headers.
+
+ * ForwardingHeaders/wtf/HashFunctions.h: Added.
+ * ForwardingHeaders/wtf/HashTraits.h: Added.
+
+2008-09-02 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Implemented the rest of Darin's review comments for the 09-01 inline
+ caching patch.
+
+ * ForwardingHeaders/kjs/PutPropertySlot.h: Added.
+
+2008-09-01 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin Adler.
+
+ First cut at inline caching for access to vanilla JavaScript properties.
+
+ Updated for JavaScriptCore changes. Mostly mechanical addition of StructureIDs
+ to JavaScriptGlue classes, and PutPropertySlot& arguments to put functions.
+
+2008-08-22 Anders Carlsson <andersca@apple.com>
+
+ Fix build for real this time.
+
+ * UserObjectImp.h:
+
+2008-08-22 Anders Carlsson <andersca@apple.com>
+
+ Fix build.
+
+ * UserObjectImp.cpp:
+ (UserObjectImp::toPrimitive):
+ * UserObjectImp.h:
+
+2008-08-19 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ Bring back shared JSGlobalData and implicit locking, because too many clients rely on it.
+
+ * JSBase.cpp:
+ (JSBase::Release):
+ * JSUtils.cpp:
+ (JSObjectKJSValue):
+ (KJSValueToCFTypeInternal):
+ (unprotectGlobalObject):
+ * JSUtils.h:
+ * JSValueWrapper.cpp:
+ (JSValueWrapper::JSObjectCopyPropertyNames):
+ (JSValueWrapper::JSObjectCopyProperty):
+ (JSValueWrapper::JSObjectSetProperty):
+ (JSValueWrapper::JSObjectCallFunction):
+ (JSValueWrapper::JSObjectCopyCFValue):
+ * JavaScriptGlue.cpp:
+ (JSRunCreate):
+ (JSRunEvaluate):
+ (JSRunCheckSyntax):
+ (JSCollect):
+ (JSLockInterpreter):
+ (JSUnlockInterpreter):
+ * UserObjectImp.cpp:
+ (UserObjectImp::callAsFunction):
+
+2008-08-12 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff.
+
+ - eliminate JSValue::type()
+
+ * JSUtils.cpp:
+ (KJSValueToCFTypeInternal): Replaced uses of JSValue::type() with
+ JSValue::is functions.
+ * UserObjectImp.cpp:
+ (UserObjectImp::getOwnPropertySlot): Ditto.
+ (UserObjectImp::toPrimitive): Take PreferredPrimitiveType argument
+ instead of JSType argument.
+ * UserObjectImp.h: Ditto.
+
+2008-08-17 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Cameron Zwarich.
+
+ Updated project files to XCode 3.1.
+
+ * JavaScriptGlue.xcodeproj/project.pbxproj:
+
+2008-08-15 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Geoff Garen.
+
+ <rdar://problem/6139914> Please include a _debug version of JavaScriptCore framework
+
+ * Configurations/Base.xcconfig: Factor out the debug-only settings so that they can shared
+ between the Debug configuration and debug Production variant.
+ * JavaScriptGlue.xcodeproj/project.pbxproj: Enable the debug variant.
+
+2008-07-31 Alexey Proskuryakov <ap@webkit.org>
+
+ Rubber-stamped by Maciej.
+
+ Eliminate JSLock (it was already disabled, removing the stub implementaion and all
+ call sites now).
+
+ * JSBase.cpp:
+ (JSBase::Release):
+ * JSUtils.cpp:
+ (JSObjectKJSValue):
+ (KJSValueToCFTypeInternal):
+ (unprotectGlobalObject):
+ * JSUtils.h:
+ * JSValueWrapper.cpp:
+ (JSValueWrapper::JSObjectCopyPropertyNames):
+ (JSValueWrapper::JSObjectCopyProperty):
+ (JSValueWrapper::JSObjectSetProperty):
+ (JSValueWrapper::JSObjectCallFunction):
+ (JSValueWrapper::JSObjectCopyCFValue):
+ * JavaScriptGlue.cpp:
+ (JSRunCreate):
+ (JSRunEvaluate):
+ (JSRunCheckSyntax):
+ (JSCollect):
+ (JSLockInterpreter):
+ (JSUnlockInterpreter):
+ * UserObjectImp.cpp:
+ (UserObjectImp::callAsFunction):
+
+2008-07-29 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ Implement JSContextGroup APIs to make concurrent execution possible for
+ JavaScriptCore clients.
+
+ * JSRun.cpp:
+ (JSRun::JSRun):
+ * JSUtils.cpp:
+ (getThreadGlobalExecState):
+ Changed JavaScriptGlue to use a JSGlobalData of its own, now that there is no shared
+ instance.
+
+2008-07-23 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ Make JSClassRef work with any context, not just the first one it was used in.
+
+ * ForwardingHeaders/wtf/HashMap.h: Added.
+
+2008-07-22 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt and Sam Weinig.
+
+ Next step toward putting doubles in registers: Prepare the Register class
+ and its clients for registers that don't contain JSValue*s.
+
+2008-07-21 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/6091287> Revamp the handling of CFBundleShortVersionString to be fixed at the major component of the version number.
+
+ * Configurations/Version.xcconfig:
+ * Info.plist:
+
+2008-07-18 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Cameron Zwarich.
+
+ Three renames:
+
+ "CallTypeNative" => "CallTypeHost"
+ "code" => "byteCode"
+ "generatedCode" => "generatedByteCode"
+
+ * ChangeLog:
+ * JSObject.cpp:
+ (JSUserObject::getCallData):
+
+2008-07-14 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ Eliminate per-thread JavaScript global data instance support and make arbitrary
+ global data/global object combinations possible.
+
+ * ForwardingHeaders/wtf/ThreadSpecific.h: Added.
+ * JSRun.cpp:
+ (JSRun::JSRun):
+ * JSUtils.cpp:
+ (getThreadGlobalExecState):
+ Adapt to the new way of asking for shared JSGlobalData.
+
+2008-07-10 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Define WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST when building WebKit to ensure that no symbols end up with the weak_import attribute.
+
+ * Configurations/JavaScriptGlue.xcconfig:
+
+2008-07-09 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Don't warn about deprecated functions in production builds.
+
+ * Configurations/Base.xcconfig:
+ * Configurations/DebugRelease.xcconfig:
+
+2008-07-08 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/6058368> REGRESSION: Crash occurs in KJS::Machine after launching
+ Apple Installer
+
+ The problem was that JSUserObject::getCallData() was setting call type to native, but
+ left callData.native.function uninitialized.
+
+ * JSObject.cpp:
+ (JSUserObject::getCallData): Initialize callData.native.function.
+ (nativeCallFunction): Call UserObjectImp::callAsFunction().
+
+2008-07-04 Sam Weinig <sam@webkit.org>
+
+ Rubber-stamped by Dan Bernstein.
+
+ * JSObject.h: Rename the header guard as it now conflicts with the
+ JSObject in JavaScriptCore.
+
+2008-07-01 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Disable JSLock for per-thread contexts.
+
+ * ForwardingHeaders/wtf/Locker.h: Added.
+ * ForwardingHeaders/wtf/Threading.h: Added.
+ * JSBase.cpp:
+ (JSBase::Release):
+ * JSUtils.cpp:
+ (JSObjectKJSValue):
+ (KJSValueToCFTypeInternal):
+ (unprotectGlobalObject):
+ * JSUtils.h:
+ * JSValueWrapper.cpp:
+ (JSValueWrapper::JSObjectCopyPropertyNames):
+ (JSValueWrapper::JSObjectCopyProperty):
+ (JSValueWrapper::JSObjectSetProperty):
+ (JSValueWrapper::JSObjectCallFunction):
+ (JSValueWrapper::JSObjectCopyCFValue):
+ * JavaScriptGlue.cpp:
+ (JSRunCreate):
+ (JSRunEvaluate):
+ (JSRunCheckSyntax):
+ (JSCollect):
+ (JSLockInterpreter):
+ (JSUnlockInterpreter):
+ * UserObjectImp.cpp:
+ (UserObjectImp::callAsFunction):
+ Pass a parameter (always true) to JSLock and JSLock::DropAllLocks to indicate that JSG
+ clients always need implicit mutex protection.
+ Added includes that are now needed.
+
+2008-06-26 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff.
+
+ * JSUtils.cpp: Added include of <JavaScriptCore/JSString.h> since jsString
+ will soon be changed to return a JSString*.
+ * UserObjectImp.cpp: Ditto.
+
+2008-06-23 Darin Adler <darin@apple.com>
+
+ Reviewed by Geoff.
+
+ * JSValueWrapper.cpp:
+ (JSValueWrapper::JSObjectCallFunction): Updated to use getCallData and call instead
+ of the old callAsFunction.
+
+2008-06-17 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Prepare JavaScript heap for being per-thread.
+
+ * JSRun.cpp: (JSRun::JSRun): Create JSGlueGlobalObject in a shared JS heap.
+
+ * JSUtils.h: Made getThreadGlobalExecState available throughout JSGlue.
+
+ * JSUtils.cpp:
+ (JSObjectKJSValue): Pass an ExecState where now required.
+ (unprotectGlobalObject):
+ (initializeGlobalObjectKey):
+ (getThreadGlobalExecState):
+ Moved these functions from JSValueWrapper.cpp, as the global exec state is now needed
+ elsewhere. I'm not quite sure how this relates to the global object from JSRun, but
+ since the new uses are all for Heap access, there doesn't seem to be any behavior change.
+
+ * JavaScriptGlue.cpp:
+ (JSLockInterpreter): Don't call registerThread explicitly, as JSLock will do that.
+
+ * UserObjectImp.cpp: (UserObjectImp::toPrimitive): Pass ExecState* where now required.
+
+2008-06-17 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/5775802> JavaScriptGlue should not force use of GCC 4.0.
+
+ * JavaScriptGlue.xcodeproj/project.pbxproj:
+
+2008-06-16 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Alexey.
+
+ - removed nearly unused types.h and LocalStorageEntry.h headers
+
+ * JSUtils.h:
+
+2008-06-16 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Geoff Garen.
+
+ Make Identifier construction use an explicitly passed IdentifierTable.
+
+ * JSUtils.cpp:
+ (CFStringToIdentifier):
+ (KJSValueToCFTypeInternal):
+ * JSUtils.h:
+ * JSValueWrapper.cpp:
+ (JSValueWrapper::JSObjectCopyPropertyNames):
+ (JSValueWrapper::JSObjectCopyProperty):
+ (JSValueWrapper::JSObjectSetProperty):
+ * UserObjectImp.cpp:
+ (UserObjectImp::getPropertyNames):
+ Pass ExecState or JSGlobalData everywhere.
+
+2008-06-15 Darin Adler <darin@apple.com>
+
+ - rename KJS::List to KJS::ArgList
+
+ * JSValueWrapper.cpp:
+ (JSValueWrapper::JSObjectCallFunction):
+ * UserObjectImp.cpp:
+ (UserObjectImp::callAsFunction):
+ * UserObjectImp.h:
+
+2008-06-15 Darin Adler <darin@apple.com>
+
+ - new names for a few key JavaScriptCore files
+
+ * ForwardingHeaders/kjs/JSValue.h: Copied from JavaScriptGlue/ForwardingHeaders/kjs/value.h.
+ * ForwardingHeaders/kjs/value.h: Removed.
+ * JSUtils.h:
+
+2008-06-03 Darin Adler <darin@apple.com>
+
+ - update for JavaScriptCore changes for https://bugs.webkit.org/show_bug.cgi?id=19269
+ speed up SunSpider by eliminating the toObject call for most get/put/delete
+
+ * UserObjectImp.cpp:
+ (UserObjectImp::userObjectGetter): Removed originalObject argument.
+ * UserObjectImp.h: Ditto.
+
+2008-06-02 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Removed JSObject::call, since it just called JSObject::callAsFunction.
+
+ SunSpider reports no change.
+
+2008-05-28 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Fixed total destruction in Software Update.app.
+
+ Updated JavaScriptGlue to honor squirrelfish's new getCallData mechanism for
+ indicating that an object can be called as a function.
+
+2008-05-10 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Oliver.
+
+ - JavaScriptGlue part of fix for: "SQUIRRELFISH: function toString broken after calling"
+ https://bugs.webkit.org/show_bug.cgi?id=18869
+
+ * JSRun.cpp:
+ (JSRun::Evaluate): Use UString version of eveluate() instead of
+ the now departed UChar*/length variant; use of the lower-level
+ version was gratuitous in any case.
+ (JSRun::CheckSyntax): Ditto for checkSyntax().
+
+2008-04-30 Geoffrey Garen <ggaren@apple.com>
+
+ Build fix: supply missing parameter that used to be implicit.
+
+ * JSRun.cpp:
+ (JSRun::Evaluate):
+
+2008-03-30 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Build fix.
+
+ * ForwardingHeaders/wtf/UnusedParam.h: Copied from ForwardingHeaders/wtf/OwnPtr.h.
+
+2008-05-12 Alexey Proskuryakov <ap@webkit.org>
+
+ Roll out recent threading changes (r32807, r32810, r32819, r32822) to simplify
+ SquirrelFish merging.
+
+ * JSUtils.cpp:
+ (JSObjectKJSValue):
+ * JSUtils.h:
+ * JSValueWrapper.cpp:
+ (unprotectGlobalObject):
+ (initializeGlobalObjectKey):
+ (getThreadGlobalExecState):
+ * JavaScriptGlue.cpp:
+ (JSCollect):
+ (JSLockInterpreter):
+ * UserObjectImp.cpp:
+ (UserObjectImp::toPrimitive):
+
+2008-05-02 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Make JavaScriptGlue and JavaScriptCore API functions implicitly call initializeThreading
+ for the sake of non-WebKit clients.
+
+ * JavaScriptGlue.cpp:
+ (JSRunCreate):
+ (JSCollect):
+ (JSCreateJSArrayFromCFArray):
+ (JSLockInterpreter):
+ These are all possible JavaScriptGlue entry points.
+
+2008-05-02 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Geoffrey Garen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=18826
+ Make JavaScript heap per-thread
+
+ * JSValueWrapper.cpp:
+ * JSUtils.h:
+ Moved getThreadGlobalExecState() to JSUtils and made it extern, as ExecState is now needed
+ for all JS allocations.
+
+ * JSUtils.cpp:
+ (JSObjectKJSValue): Pass ExecState to functions that now need it.
+ (unprotectGlobalObject): Moved from JSValueWrapper.cpp.
+ (initializeGlobalObjectKey): Ditto.
+ (getThreadGlobalExecState): Ditto.
+
+ * UserObjectImp.cpp: (UserObjectImp::toPrimitive): Pass ExecState to jsString and jsNumber.
+
+ * JavaScriptGlue.cpp:
+ (JSCollect): Use current thread's heap.
+ (JSLockInterpreter): Removed JSLock::registerThread(), because a JS heap doesn't need to
+ know about other threads.
+
+2008-04-25 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Fix run-webkit-tests --threading
+ and provisionally fix <https://bugs.webkit.org/show_bug.cgi?id=18661>
+ Proxy server issue in Sunday's Nightly
+
+ * UserObjectImp.cpp: Adjusted for the new member added to ClassInfo.
+
+2008-04-25 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ <rdar://problem/5891264> Don't install the JavaScriptGlue headers
+
+ * JavaScriptGlue.xcodeproj/project.pbxproj:
+
+2008-04-25 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Sam Weinig.
+
+ Add some content to an empty ICU header file to prevent verification errors.
+
+ * icu/unicode/utf_old.h:
+
+2008-04-02 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Ensure that debug symbols are generated for x86_64 and ppc64 builds.
+
+ * Configurations/Base.xcconfig:
+
+2008-03-20 Maciej Stachowiak <mjs@apple.com>
+
+ - fix build
+
+ * ForwardingHeaders/wtf/ListRefPtr.h: Added.
+
+2008-03-01 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Tim Hatcher.
+
+ Update Xcode configuration to support building debug and release from the mysterious future.
+
+ * Configurations/Base.xcconfig:
+ * Configurations/DebugRelease.xcconfig:
+
+2008-02-29 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by David Harrison.
+
+ Fixed <rdar://problem/5765063> TOT REGRESSION: Software Update crash in
+ KJS::Collector::collect() (missing JSLock)
+
+ * JSValueWrapper.cpp:
+ (unprotectGlobalObject): Added missing JSLock.
+
2008-02-05 Mark Rowe <mrowe@apple.com>
Reviewed by Oliver Hunt.
@@ -164,7 +926,7 @@
Sort files(...); sections of Xcode project files.
- Rubber-stamped by Darin.
+ Rubber-stamped by Darin Adler.
* JavaScriptGlue.xcodeproj/project.pbxproj:
@@ -245,7 +1007,7 @@
2007-03-24 Mark Rowe <mrowe@apple.com>
- Rubber-stamped by Darin.
+ Rubber-stamped by Darin Adler.
* Configurations/JavaScriptGlue.xcconfig: Remove unnecessary INFOPLIST_PREPROCESS.
@@ -400,7 +1162,7 @@
2006-12-19 Timothy Hatcher <timothy@apple.com>
- Reviewed by Darin.
+ Reviewed by Darin Adler.
<rdar://problem/4891774> Local WebCore/WebBrowser builds fail in 9A328 due to warning about ObjC-2.0 language features
@@ -436,7 +1198,7 @@
2006-08-04 Sam Weinig <sam.weinig@gmail.com>
- Reviewed by Darin.
+ Reviewed by Darin Adler.
- patch for http://bugs.webkit.org/show_bug.cgi?id=10192
Make WebCore (and friends) compile with -Wshorten-64-to-32
@@ -447,7 +1209,7 @@
2006-08-03 Sam Weinig <sam.weinig@gmail.com>
- Reviewed by Darin.
+ Reviewed by Darin Adler.
- patch for http://bugs.webkit.org/show_bug.cgi?id=10176
Make WebCore compile with -Wundef
@@ -458,7 +1220,7 @@
2006-07-29 Sam Weinig <sam.weinig@gmail.com>
- Reviewed by Darin.
+ Reviewed by Darin Adler.
- patch for http://bugs.webkit.org/show_bug.cgi?id=10080
Adopt pedantic changes from the Unity project to improve
@@ -489,7 +1251,7 @@
2006-07-15 Maciej Stachowiak <mjs@apple.com>
- Reviewed by Darin.
+ Reviewed by Darin Adler.
- switch property lists to be vector+set of Identifiers instead of list of References
@@ -658,7 +1420,7 @@
2006-04-04 Timothy Hatcher <timothy@apple.com>
- Reviewed by Darin.
+ Reviewed by Darin Adler.
The Debug and Release frameworks are now built with install paths relative to the build products directory.
This removes the need for other projects to build with -framework WebCore and -framework JavaScriptCore.
@@ -675,7 +1437,7 @@
2006-03-31 Geoffrey Garen <ggaren@apple.com>
- Reviewed by Darin.
+ Reviewed by Darin Adler.
- Fixed <rdar://problem/4430836> JavaScript patch crashing Quartz
Composer
@@ -946,7 +1708,7 @@
2005-11-04 Timothy Hatcher <timothy@apple.com>
- Reviewed by Darin.
+ Reviewed by Darin Adler.
* JavaScriptGlue.xcodeproj/project.pbxproj:
Fixed the FRAMEWORK_SEARCH_PATHS to look in the WebKit
diff --git a/JavaScriptGlue/Configurations/Base.xcconfig b/JavaScriptGlue/Configurations/Base.xcconfig
index f7e5b82..e66fbdb 100644
--- a/JavaScriptGlue/Configurations/Base.xcconfig
+++ b/JavaScriptGlue/Configurations/Base.xcconfig
@@ -3,19 +3,19 @@ DEBUG_INFORMATION_FORMAT = dwarf;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DEBUGGING_SYMBOLS = default;
GCC_DYNAMIC_NO_PIC = NO;
-GCC_STRICT_ALIASING = YES;
-GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
GCC_ENABLE_CPP_EXCEPTIONS = NO;
GCC_ENABLE_CPP_RTTI = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_ENABLE_OBJC_GC = supported;
GCC_ENABLE_SYMBOL_SEPARATION = NO;
GCC_FAST_OBJC_DISPATCH = YES;
+GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
GCC_MODEL_TUNING = G5;
-GCC_OPTIMIZATION_LEVEL = 2;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
+GCC_STRICT_ALIASING = YES;
GCC_THREADSAFE_STATICS = NO;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
@@ -32,10 +32,28 @@ WARNING_CFLAGS_ppc64 = $(WARNING_CFLAGS_BASE);
WARNING_CFLAGS_x86_64 = $(WARNING_CFLAGS_BASE);
HEADER_SEARCH_PATHS = . icu $(HEADER_SEARCH_PATHS);
+
+// DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL and STRIP_INSTALLED_PRODUCT vary between the debug and normal variants.
+// We set up the values for each variant here, and have the Debug configuration in the Xcode project use the _debug variant.
+DEBUG_DEFINES_debug = ;
+DEBUG_DEFINES_normal = NDEBUG;
+DEBUG_DEFINES = $(DEBUG_DEFINES_$(CURRENT_VARIANT));
+
+GCC_OPTIMIZATION_LEVEL = $(GCC_OPTIMIZATION_LEVEL_$(CURRENT_VARIANT));
+GCC_OPTIMIZATION_LEVEL_normal = 2;
+GCC_OPTIMIZATION_LEVEL_debug = 0;
+
+STRIP_INSTALLED_PRODUCT = $(STRIP_INSTALLED_PRODUCT_$(CURRENT_VARIANT));
+STRIP_INSTALLED_PRODUCT_normal = YES;
+STRIP_INSTALLED_PRODUCT_debug = NO;
+
+
// <rdar://problem/5488678>: Production builds on 10.4 PowerPC need to have debugging symbols disabled to prevent a huge STABS section being generated.
// Xcode on 10.4 does not define MAC_OS_X_VERSION_MAJOR, so the default Mac OS X version is treated as 10.4.
GCC_GENERATE_DEBUGGING_SYMBOLS = $(GCC_GENERATE_DEBUGGING_SYMBOLS_$(CURRENT_ARCH));
GCC_GENERATE_DEBUGGING_SYMBOLS_i386 = YES;
+GCC_GENERATE_DEBUGGING_SYMBOLS_x86_64 = YES;
+GCC_GENERATE_DEBUGGING_SYMBOLS_ppc64 = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS_ppc = $(GCC_GENERATE_DEBUGGING_SYMBOLS_$(CURRENT_ARCH)_$(CONFIGURATION));
GCC_GENERATE_DEBUGGING_SYMBOLS_ppc_Debug = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS_ppc_Release = YES;
@@ -43,3 +61,4 @@ GCC_GENERATE_DEBUGGING_SYMBOLS_ppc_Production = $(GCC_GENERATE_DEBUGGING_SYMBOLS
GCC_GENERATE_DEBUGGING_SYMBOLS_ppc_Production_ = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS_ppc_Production_1040 = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS_ppc_Production_1050 = YES;
+GCC_GENERATE_DEBUGGING_SYMBOLS_ppc_Production_1060 = YES;
diff --git a/JavaScriptGlue/Configurations/DebugRelease.xcconfig b/JavaScriptGlue/Configurations/DebugRelease.xcconfig
index f93e177..0515da4 100644
--- a/JavaScriptGlue/Configurations/DebugRelease.xcconfig
+++ b/JavaScriptGlue/Configurations/DebugRelease.xcconfig
@@ -1,5 +1,14 @@
#include "Base.xcconfig"
+ARCHS = $(NATIVE_ARCH);
+
MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(MAC_OS_X_VERSION_MAJOR));
MACOSX_DEPLOYMENT_TARGET_ = 10.4;
MACOSX_DEPLOYMENT_TARGET_1040 = 10.4;
MACOSX_DEPLOYMENT_TARGET_1050 = 10.5;
+MACOSX_DEPLOYMENT_TARGET_1060 = 10.6;
+
+GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
+
+GCC_VERSION = $(GCC_VERSION_$(XCODE_VERSION_ACTUAL));
+GCC_VERSION_0310 = 4.2;
+GCC_VERSION_0311 = 4.2;
diff --git a/JavaScriptGlue/Configurations/JavaScriptGlue.xcconfig b/JavaScriptGlue/Configurations/JavaScriptGlue.xcconfig
index e6cfebc..eacdcab 100644
--- a/JavaScriptGlue/Configurations/JavaScriptGlue.xcconfig
+++ b/JavaScriptGlue/Configurations/JavaScriptGlue.xcconfig
@@ -1,6 +1,6 @@
#include "Version.xcconfig"
EXPORTED_SYMBOLS_FILE = JavaScriptGlue.exp;
-GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(GCC_PREPROCESSOR_DEFINITIONS);
+GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST $(GCC_PREPROCESSOR_DEFINITIONS);
HEADER_SEARCH_PATHS = ForwardingHeaders $(HEADER_SEARCH_PATHS);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
diff --git a/JavaScriptGlue/Configurations/Version.xcconfig b/JavaScriptGlue/Configurations/Version.xcconfig
index 639116d..16698b9 100644
--- a/JavaScriptGlue/Configurations/Version.xcconfig
+++ b/JavaScriptGlue/Configurations/Version.xcconfig
@@ -1,14 +1,11 @@
-MAJOR_VERSION = 525;
-MINOR_VERSION = 10;
+MAJOR_VERSION = 528;
+MINOR_VERSION = 5;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
-// The bundle version is set based on the current build configuration, see below.
+// The bundle version and short version string are set based on the current build configuration, see below.
BUNDLE_VERSION = $(BUNDLE_VERSION_$(CONFIGURATION));
-
-// The local builds are always just the major version with a Plus suffix.
-BUNDLE_VERSION_Release = $(FULL_VERSION)+;
-BUNDLE_VERSION_Debug = $(BUNDLE_VERSION_Release);
+SHORT_VERSION_STRING = $(SHORT_VERSION_STRING_$(CONFIGURATION))
// The system version prefix is based on the current system version.
SYSTEM_VERSION_PREFIX = $(SYSTEM_VERSION_PREFIX_$(MAC_OS_X_VERSION_MAJOR));
@@ -19,9 +16,19 @@ SYSTEM_VERSION_PREFIX_1060 = 6;
// The production build always uses the full version with a system version prefix.
BUNDLE_VERSION_Production = $(SYSTEM_VERSION_PREFIX)$(FULL_VERSION);
-
-// If $(CONFIGURATION) is undefined, use the Production version.
BUNDLE_VERSION_ = $(BUNDLE_VERSION_Production);
+// The production build always uses the major version with a system version prefix
+SHORT_VERSION_STRING_Production = $(SYSTEM_VERSION_PREFIX)$(MAJOR_VERSION);
+SHORT_VERSION_STRING_ = $(SHORT_VERSION_STRING_Production);
+
+// Local builds are the full version with a plus suffix.
+BUNDLE_VERSION_Release = $(FULL_VERSION)+;
+BUNDLE_VERSION_Debug = $(BUNDLE_VERSION_Release);
+
+// Local builds use the major version with a plus suffix
+SHORT_VERSION_STRING_Release = $(MAJOR_VERSION)+;
+SHORT_VERSION_STRING_Debug = $(SHORT_VERSION_STRING_Release);
+
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = $(FULL_VERSION);
diff --git a/JavaScriptGlue/ForwardingHeaders/kjs/value.h b/JavaScriptGlue/ForwardingHeaders/kjs/value.h
deleted file mode 100644
index ecd784d..0000000
--- a/JavaScriptGlue/ForwardingHeaders/kjs/value.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <JavaScriptCore/value.h>
diff --git a/JavaScriptGlue/ForwardingHeaders/masm/X86Assembler.h b/JavaScriptGlue/ForwardingHeaders/masm/X86Assembler.h
new file mode 100644
index 0000000..e1f0b4d
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/masm/X86Assembler.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/X86Assembler.h>
diff --git a/JavaScriptGlue/ForwardingHeaders/profiler/Profiler.h b/JavaScriptGlue/ForwardingHeaders/profiler/Profiler.h
new file mode 100644
index 0000000..56c6e0e
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/profiler/Profiler.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/Profiler.h>
diff --git a/JavaScriptGlue/ForwardingHeaders/kjs/ExecState.h b/JavaScriptGlue/ForwardingHeaders/runtime/ExecState.h
index 0eb1de8..0eb1de8 100644
--- a/JavaScriptGlue/ForwardingHeaders/kjs/ExecState.h
+++ b/JavaScriptGlue/ForwardingHeaders/runtime/ExecState.h
diff --git a/JavaScriptGlue/ForwardingHeaders/wtf/HashFunctions.h b/JavaScriptGlue/ForwardingHeaders/wtf/HashFunctions.h
new file mode 100644
index 0000000..0fa568a
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/wtf/HashFunctions.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/HashFunctions.h>
diff --git a/JavaScriptGlue/ForwardingHeaders/wtf/HashMap.h b/JavaScriptGlue/ForwardingHeaders/wtf/HashMap.h
new file mode 100644
index 0000000..9f262e2
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/wtf/HashMap.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/HashMap.h>
diff --git a/JavaScriptGlue/ForwardingHeaders/wtf/HashTraits.h b/JavaScriptGlue/ForwardingHeaders/wtf/HashTraits.h
new file mode 100644
index 0000000..412fa98
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/wtf/HashTraits.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/HashTraits.h>
diff --git a/JavaScriptGlue/ForwardingHeaders/wtf/ListRefPtr.h b/JavaScriptGlue/ForwardingHeaders/wtf/ListRefPtr.h
new file mode 100644
index 0000000..b766736
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/wtf/ListRefPtr.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/ListRefPtr.h>
diff --git a/JavaScriptGlue/ForwardingHeaders/wtf/Locker.h b/JavaScriptGlue/ForwardingHeaders/wtf/Locker.h
new file mode 100644
index 0000000..75b0acd
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/wtf/Locker.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/Locker.h>
diff --git a/JavaScriptGlue/ForwardingHeaders/wtf/NotFound.h b/JavaScriptGlue/ForwardingHeaders/wtf/NotFound.h
new file mode 100644
index 0000000..cfe1896
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/wtf/NotFound.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/NotFound.h>
diff --git a/JavaScriptGlue/ForwardingHeaders/wtf/ThreadSpecific.h b/JavaScriptGlue/ForwardingHeaders/wtf/ThreadSpecific.h
new file mode 100644
index 0000000..48f1db5
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/wtf/ThreadSpecific.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/ThreadSpecific.h>
diff --git a/JavaScriptGlue/ForwardingHeaders/wtf/Threading.h b/JavaScriptGlue/ForwardingHeaders/wtf/Threading.h
new file mode 100644
index 0000000..17359e5
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/wtf/Threading.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/Threading.h>
diff --git a/JavaScriptGlue/ForwardingHeaders/wtf/UnusedParam.h b/JavaScriptGlue/ForwardingHeaders/wtf/UnusedParam.h
new file mode 100644
index 0000000..aa3d3d0
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/wtf/UnusedParam.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/UnusedParam.h>
diff --git a/JavaScriptGlue/Info.plist b/JavaScriptGlue/Info.plist
index 04c5312..2991f8d 100644
--- a/JavaScriptGlue/Info.plist
+++ b/JavaScriptGlue/Info.plist
@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>${BUNDLE_VERSION}</string>
+ <string>${SHORT_VERSION_STRING}</string>
<key>CFBundleVersion</key>
<string>${BUNDLE_VERSION}</string>
</dict>
diff --git a/JavaScriptGlue/JSBase.cpp b/JavaScriptGlue/JSBase.cpp
index 0a622c0..8728096 100644
--- a/JavaScriptGlue/JSBase.cpp
+++ b/JavaScriptGlue/JSBase.cpp
@@ -46,7 +46,7 @@ void JSBase::Release()
{
if (--fRetainCount == 0)
{
- JSLock lock;
+ JSLock lock(true);
delete this;
}
}
diff --git a/JavaScriptGlue/JSObject.cpp b/JavaScriptGlue/JSObject.cpp
index 1290cb3..9e6bec0 100644
--- a/JavaScriptGlue/JSObject.cpp
+++ b/JavaScriptGlue/JSObject.cpp
@@ -29,6 +29,8 @@
#include "config.h"
#include "JSObject.h"
+#include "UserObjectImp.h"
+
JSUserObject::JSUserObject(JSObjectCallBacksPtr callBacks, JSObjectMarkProcPtr markProc, void *data, int dataType)
: JSBase(kJSObjectTypeID), fCallBacks(*callBacks), fMarkProc(markProc), fData(data), fDataType(dataType)
{
@@ -71,9 +73,18 @@ void JSUserObject::SetProperty(CFStringRef propertyName, JSUserObject* value)
}
-bool JSUserObject::ImplementsCall()
+static JSValue* nativeCallFunction(ExecState* exec, JSObject* functionObject, JSValue* thisValue, const ArgList& args)
{
- return fCallBacks.callFunction ? true : false;
+ return static_cast<UserObjectImp*>(functionObject)->callAsFunction(exec, asObject(thisValue), args);
+}
+
+CallType JSUserObject::getCallData(CallData& callData)
+{
+ if (!fCallBacks.callFunction)
+ return CallTypeNone;
+
+ callData.native.function = nativeCallFunction;
+ return CallTypeHost;
}
JSUserObject* JSUserObject::CallFunction(JSUserObject* thisObj, CFArrayRef args)
diff --git a/JavaScriptGlue/JSObject.h b/JavaScriptGlue/JSObject.h
index f0be22e..ec00dac 100644
--- a/JavaScriptGlue/JSObject.h
+++ b/JavaScriptGlue/JSObject.h
@@ -26,8 +26,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef JSObject_h
-#define JSObject_h
+#ifndef JSGlue_JSObject_h
+#define JSGlue_JSObject_h
#include "JSBase.h"
#include "JSUtils.h"
@@ -43,7 +43,7 @@ class JSUserObject : public JSBase {
CFArrayRef CopyPropertyNames(void);
JSUserObject* CopyProperty(CFStringRef propertyName);
void SetProperty(CFStringRef propertyName, JSUserObject* value);
- bool ImplementsCall();
+ CallType getCallData(CallData&);
JSUserObject* CallFunction(JSUserObject* thisObj, CFArrayRef args);
CFTypeRef CopyCFValue() const;
virtual UInt8 Equal(JSBase* other);
@@ -58,4 +58,4 @@ class JSUserObject : public JSBase {
int fDataType;
};
-#endif
+#endif // JSGlue_JSObject_h
diff --git a/JavaScriptGlue/JSRun.cpp b/JavaScriptGlue/JSRun.cpp
index a0dd5ef..39af161 100644
--- a/JavaScriptGlue/JSRun.cpp
+++ b/JavaScriptGlue/JSRun.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -29,10 +29,21 @@
#include "config.h"
#include "JSRun.h"
+#include "UserObjectImp.h"
+#include <JavaScriptCore/SourceCode.h>
+#include <JavaScriptCore/completion.h>
+
+JSGlueGlobalObject::JSGlueGlobalObject(PassRefPtr<StructureID> structure, JSFlags flags)
+ : JSGlobalObject(structure, new Data, this)
+{
+ d()->flags = flags;
+ d()->userObjectStructure = UserObjectImp::createStructureID(jsNull());
+}
+
JSRun::JSRun(CFStringRef source, JSFlags inFlags)
: JSBase(kJSRunTypeID),
fSource(CFStringToUString(source)),
- fGlobalObject(new JSGlueGlobalObject(inFlags)),
+ fGlobalObject(new (&getThreadGlobalExecState()->globalData()) JSGlueGlobalObject(JSGlueGlobalObject::createStructureID(jsNull()), inFlags)),
fFlags(inFlags)
{
}
@@ -58,10 +69,10 @@ JSGlobalObject* JSRun::GlobalObject() const
Completion JSRun::Evaluate()
{
- return Interpreter::evaluate(fGlobalObject->globalExec(), UString(), 0, fSource.data(), fSource.size());
+ return Interpreter::evaluate(fGlobalObject->globalExec(), fGlobalObject->globalScopeChain(), makeSource(fSource));
}
bool JSRun::CheckSyntax()
{
- return Interpreter::checkSyntax(fGlobalObject->globalExec(), UString(), 0, fSource.data(), fSource.size()).complType() != Throw;
+ return Interpreter::checkSyntax(fGlobalObject->globalExec(), makeSource(fSource)).complType() != Throw;
}
diff --git a/JavaScriptGlue/JSRun.h b/JavaScriptGlue/JSRun.h
index 3d5647c..4281b54 100644
--- a/JavaScriptGlue/JSRun.h
+++ b/JavaScriptGlue/JSRun.h
@@ -34,12 +34,18 @@
class JSGlueGlobalObject : public JSGlobalObject {
public:
- JSGlueGlobalObject(JSFlags flags) : fJSFlags(flags) { }
- JSGlueGlobalObject() : fJSFlags(kJSFlagNone) { }
- JSFlags Flags() const { return fJSFlags; }
+ JSGlueGlobalObject(PassRefPtr<StructureID>, JSFlags = kJSFlagNone);
+
+ JSFlags Flags() const { return d()->flags; }
+ StructureID* userObjectStructure() const { return d()->userObjectStructure.get(); }
private:
- JSFlags fJSFlags;
+ struct Data : JSGlobalObjectData {
+ RefPtr<StructureID> userObjectStructure;
+ JSFlags flags;
+ };
+
+ Data* d() const { return static_cast<Data*>(JSGlobalObject::d()); }
};
class JSRun : public JSBase {
diff --git a/JavaScriptGlue/JSUtils.cpp b/JavaScriptGlue/JSUtils.cpp
index dbc370e..f5425c4 100644
--- a/JavaScriptGlue/JSUtils.cpp
+++ b/JavaScriptGlue/JSUtils.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,12 +28,13 @@
#include "config.h"
#include "JSUtils.h"
+
#include "JSBase.h"
#include "JSObject.h"
#include "JSRun.h"
-#include "UserObjectImp.h"
#include "JSValueWrapper.h"
-#include "JSObject.h"
+#include "UserObjectImp.h"
+#include <JavaScriptCore/JSString.h>
#include <JavaScriptCore/PropertyNameArray.h>
struct ObjectImpList {
@@ -42,8 +43,8 @@ struct ObjectImpList {
CFTypeRef data;
};
-static CFTypeRef KJSValueToCFTypeInternal(JSValue *inValue, ExecState *exec, ObjectImpList* inImps);
-
+static CFTypeRef KJSValueToCFTypeInternal(JSValue* inValue, ExecState *exec, ObjectImpList* inImps);
+static JSGlueGlobalObject* getThreadGlobalObject();
//--------------------------------------------------------------------------
// CFStringToUString
@@ -80,9 +81,9 @@ CFStringRef UStringToCFString(const UString& inUString)
// CFStringToIdentifier
//--------------------------------------------------------------------------
-Identifier CFStringToIdentifier(CFStringRef inCFString)
+Identifier CFStringToIdentifier(CFStringRef inCFString, ExecState* exec)
{
- return Identifier(CFStringToUString(inCFString));
+ return Identifier(exec, CFStringToUString(inCFString));
}
@@ -99,12 +100,12 @@ CFStringRef IdentifierToCFString(const Identifier& inIdentifier)
//--------------------------------------------------------------------------
// KJSValueToJSObject
//--------------------------------------------------------------------------
-JSUserObject* KJSValueToJSObject(JSValue *inValue, ExecState *exec)
+JSUserObject* KJSValueToJSObject(JSValue* inValue, ExecState *exec)
{
JSUserObject* result = 0;
if (inValue->isObject(&UserObjectImp::info)) {
- UserObjectImp* userObjectImp = static_cast<UserObjectImp *>(inValue);
+ UserObjectImp* userObjectImp = static_cast<UserObjectImp *>(asObject(inValue));
result = userObjectImp->GetJSUserObject();
if (result)
result->Retain();
@@ -125,11 +126,11 @@ JSUserObject* KJSValueToJSObject(JSValue *inValue, ExecState *exec)
//--------------------------------------------------------------------------
// JSObjectKJSValue
//--------------------------------------------------------------------------
-JSValue *JSObjectKJSValue(JSUserObject* ptr)
+JSValue* JSObjectKJSValue(JSUserObject* ptr)
{
- JSLock lock;
+ JSLock lock(true);
- JSValue *result = jsUndefined();
+ JSValue* result = jsUndefined();
if (ptr)
{
bool handled = false;
@@ -155,14 +156,14 @@ JSValue *JSObjectKJSValue(JSUserObject* ptr)
CFTypeID typeID = CFGetTypeID(cfType);
if (typeID == CFStringGetTypeID())
{
- result = jsString(CFStringToUString((CFStringRef)cfType));
+ result = jsString(getThreadGlobalExecState(), CFStringToUString((CFStringRef)cfType));
handled = true;
}
else if (typeID == CFNumberGetTypeID())
{
double num;
CFNumberGetValue((CFNumberRef)cfType, kCFNumberDoubleType, &num);
- result = jsNumber(num);
+ result = jsNumber(getThreadGlobalExecState(), num);
handled = true;
}
else if (typeID == CFBooleanGetTypeID())
@@ -181,7 +182,8 @@ JSValue *JSObjectKJSValue(JSUserObject* ptr)
}
if (!handled)
{
- result = new UserObjectImp(ptr);
+ ExecState* exec = getThreadGlobalExecState();
+ result = new (exec) UserObjectImp(getThreadGlobalObject()->userObjectStructure(), ptr);
}
}
return result;
@@ -194,32 +196,30 @@ JSValue *JSObjectKJSValue(JSUserObject* ptr)
// KJSValueToCFTypeInternal
//--------------------------------------------------------------------------
// Caller is responsible for releasing the returned CFTypeRef
-CFTypeRef KJSValueToCFTypeInternal(JSValue *inValue, ExecState *exec, ObjectImpList* inImps)
+CFTypeRef KJSValueToCFTypeInternal(JSValue* inValue, ExecState *exec, ObjectImpList* inImps)
{
if (!inValue)
return 0;
CFTypeRef result = 0;
- JSLock lock;
+ JSLock lock(true);
- switch (inValue->type())
- {
- case BooleanType:
+ if (inValue->isBoolean())
{
result = inValue->toBoolean(exec) ? kCFBooleanTrue : kCFBooleanFalse;
RetainCFType(result);
+ return result;
}
- break;
- case StringType:
+ if (inValue->isString())
{
UString uString = inValue->toString(exec);
result = UStringToCFString(uString);
+ return result;
}
- break;
- case NumberType:
+ if (inValue->isNumber())
{
double number1 = inValue->toNumber(exec);
double number2 = (double)inValue->toInteger(exec);
@@ -232,13 +232,13 @@ CFTypeRef KJSValueToCFTypeInternal(JSValue *inValue, ExecState *exec, ObjectImpL
{
result = CFNumberCreate(0, kCFNumberDoubleType, &number1);
}
+ return result;
}
- break;
- case ObjectType:
+ if (inValue->isObject())
{
if (inValue->isObject(&UserObjectImp::info)) {
- UserObjectImp* userObjectImp = static_cast<UserObjectImp *>(inValue);
+ UserObjectImp* userObjectImp = static_cast<UserObjectImp *>(asObject(inValue));
JSUserObject* ptr = userObjectImp->GetJSUserObject();
if (ptr)
{
@@ -275,7 +275,7 @@ CFTypeRef KJSValueToCFTypeInternal(JSValue *inValue, ExecState *exec, ObjectImpL
isArray = true;
JSGlueGlobalObject* globalObject = static_cast<JSGlueGlobalObject*>(exec->dynamicGlobalObject());
if (globalObject && (globalObject->Flags() & kJSFlagConvertAssociativeArray)) {
- PropertyNameArray propNames;
+ PropertyNameArray propNames(exec);
object->getPropertyNames(exec, propNames);
PropertyNameArray::const_iterator iter = propNames.begin();
PropertyNameArray::const_iterator end = propNames.end();
@@ -299,7 +299,7 @@ CFTypeRef KJSValueToCFTypeInternal(JSValue *inValue, ExecState *exec, ObjectImpL
if (isArray)
{
// This is an KJS array
- unsigned int length = object->get(exec, "length")->toUInt32(exec);
+ unsigned int length = object->get(exec, Identifier(exec, "length"))->toUInt32(exec);
result = CFArrayCreateMutable(0, 0, &kCFTypeArrayCallBacks);
if (result)
{
@@ -314,7 +314,7 @@ CFTypeRef KJSValueToCFTypeInternal(JSValue *inValue, ExecState *exec, ObjectImpL
else
{
// Not an array, just treat it like a dictionary which contains (property name, property value) pairs
- PropertyNameArray propNames;
+ PropertyNameArray propNames(exec);
object->getPropertyNames(exec, propNames);
{
result = CFDictionaryCreateMutable(0,
@@ -345,24 +345,20 @@ CFTypeRef KJSValueToCFTypeInternal(JSValue *inValue, ExecState *exec, ObjectImpL
}
}
}
+ return result;
}
- break;
- case NullType:
- case UndefinedType:
- case UnspecifiedType:
+ if (inValue->isUndefinedOrNull())
+ {
result = RetainCFType(GetCFNull());
- break;
-
- default:
- fprintf(stderr, "KJSValueToCFType: wrong value type %d\n", inValue->type());
- break;
- }
+ return result;
+ }
- return result;
+ ASSERT_NOT_REACHED();
+ return 0;
}
-CFTypeRef KJSValueToCFType(JSValue *inValue, ExecState *exec)
+CFTypeRef KJSValueToCFType(JSValue* inValue, ExecState *exec)
{
return KJSValueToCFTypeInternal(inValue, exec, 0);
}
@@ -378,3 +374,54 @@ CFTypeRef GetCFNull(void)
return result;
}
+/*
+ * This is a slight hack. The JSGlue API has no concept of execution state.
+ * However, execution state is an inherent part of JS, and JSCore requires it.
+ * So, we keep a single execution state for the whole thread and supply it
+ * where necessary.
+
+ * The execution state holds two things: (1) exceptions; (2) the global object.
+ * JSGlue has no API for accessing exceptions, so we just discard them. As for
+ * the global object, JSGlue includes no calls that depend on it. Its property
+ * getters and setters are per-object; they don't walk up the enclosing scope.
+ * Functions called by JSObjectCallFunction may reference values in the enclosing
+ * scope, but they do so through an internally stored scope chain, so we don't
+ * need to supply the global scope.
+ */
+
+static pthread_key_t globalObjectKey;
+static pthread_once_t globalObjectKeyOnce = PTHREAD_ONCE_INIT;
+
+static void unprotectGlobalObject(void* data)
+{
+ JSLock lock(true);
+ gcUnprotect(static_cast<JSGlueGlobalObject*>(data));
+}
+
+static void initializeGlobalObjectKey()
+{
+ pthread_key_create(&globalObjectKey, unprotectGlobalObject);
+}
+
+static JSGlueGlobalObject* getThreadGlobalObject()
+{
+ pthread_once(&globalObjectKeyOnce, initializeGlobalObjectKey);
+ JSGlueGlobalObject* globalObject = static_cast<JSGlueGlobalObject*>(pthread_getspecific(globalObjectKey));
+ if (!globalObject) {
+ RefPtr<JSGlobalData> globalData = JSGlobalData::create();
+ globalObject = new (globalData.get()) JSGlueGlobalObject(JSGlueGlobalObject::createStructureID(jsNull()));
+ gcProtect(globalObject);
+ pthread_setspecific(globalObjectKey, globalObject);
+ }
+ return globalObject;
+}
+
+ExecState* getThreadGlobalExecState()
+{
+ ExecState* exec = getThreadGlobalObject()->globalExec();
+
+ // Discard exceptions -- otherwise an exception would forestall JS
+ // evaluation throughout the thread
+ exec->clearException();
+ return exec;
+}
diff --git a/JavaScriptGlue/JSUtils.h b/JavaScriptGlue/JSUtils.h
index 1fe8428..94d7458 100644
--- a/JavaScriptGlue/JSUtils.h
+++ b/JavaScriptGlue/JSUtils.h
@@ -31,10 +31,10 @@
#include "JavaScriptGlue.h"
-#include <JavaScriptCore/value.h>
-#include <JavaScriptCore/object.h>
+#include <JavaScriptCore/JSValue.h>
+#include <JavaScriptCore/JSLock.h>
+#include <JavaScriptCore/JSObject.h>
#include <JavaScriptCore/JSGlobalObject.h>
-#include <JavaScriptCore/types.h>
#include <JavaScriptCore/interpreter.h>
#include <JavaScriptCore/protect.h>
#include <JavaScriptCore/collector.h>
@@ -42,7 +42,7 @@
#include <wtf/RefPtr.h>
-using namespace KJS;
+using namespace JSC;
class JSBase;
class JSUserObject;
@@ -52,16 +52,18 @@ class JSUserObjectImp;
UString CFStringToUString(CFStringRef inCFString);
CFStringRef UStringToCFString(const UString& inUString);
-Identifier CFStringToIdentifier(CFStringRef inCFString);
+Identifier CFStringToIdentifier(CFStringRef inCFString, ExecState*);
CFStringRef IdentifierToCFString(const Identifier& inIdentifier);
-JSUserObject *KJSValueToJSObject(JSValue *inValue, ExecState *exec);
-CFTypeRef KJSValueToCFType(JSValue *inValue, ExecState *exec);
-JSValue *JSObjectKJSValue(JSUserObject* ptr);
+JSUserObject *KJSValueToJSObject(JSValue* inValue, ExecState *exec);
+CFTypeRef KJSValueToCFType(JSValue* inValue, ExecState *exec);
+JSValue* JSObjectKJSValue(JSUserObject* ptr);
CFTypeRef GetCFNull(void);
inline CFTypeRef RetainCFType(CFTypeRef x) { if (x) x = CFRetain(x); return x; }
inline void ReleaseCFType(CFTypeRef x) { if (x) CFRelease(x); }
+ExecState* getThreadGlobalExecState();
+
enum {
kJSInvalidTypeID = 0,
kJSObjectTypeID,
diff --git a/JavaScriptGlue/JSValueWrapper.cpp b/JavaScriptGlue/JSValueWrapper.cpp
index f955ed0..e9bd747 100644
--- a/JavaScriptGlue/JSValueWrapper.cpp
+++ b/JavaScriptGlue/JSValueWrapper.cpp
@@ -32,7 +32,7 @@
#include <JavaScriptCore/PropertyNameArray.h>
#include <pthread.h>
-JSValueWrapper::JSValueWrapper(JSValue *inValue)
+JSValueWrapper::JSValueWrapper(JSValue* inValue)
: fValue(inValue)
{
}
@@ -41,55 +41,9 @@ JSValueWrapper::~JSValueWrapper()
{
}
-JSValue *JSValueWrapper::GetValue()
+JSValue* JSValueWrapper::GetValue()
{
- return fValue;
-}
-
-/*
- * This is a slight hack. The JSGlue API has no concept of execution state.
- * However, execution state is an inherent part of JS, and JSCore requires it.
- * So, we keep a single execution state for the whole thread and supply it
- * where necessary.
-
- * The execution state holds two things: (1) exceptions; (2) the global object.
- * JSGlue has no API for accessing exceptions, so we just discard them. As for
- * the global object, JSGlue includes no calls that depend on it. Its property
- * getters and setters are per-object; they don't walk up the enclosing scope.
- * Functions called by JSObjectCallFunction may reference values in the enclosing
- * scope, but they do so through an internally stored scope chain, so we don't
- * need to supply the global scope.
- */
-
-pthread_key_t globalObjectKey;
-pthread_once_t globalObjectKeyOnce = PTHREAD_ONCE_INIT;
-
-static void unprotectGlobalObject(void* data)
-{
- gcUnprotect(static_cast<JSGlobalObject*>(data));
-}
-
-static void initializeGlobalObjectKey()
-{
- pthread_key_create(&globalObjectKey, unprotectGlobalObject);
-}
-
-static ExecState* getThreadGlobalExecState()
-{
- pthread_once(&globalObjectKeyOnce, initializeGlobalObjectKey);
- JSGlobalObject* globalObject = static_cast<JSGlobalObject*>(pthread_getspecific(globalObjectKey));
- if (!globalObject) {
- globalObject = new JSGlueGlobalObject;
- gcProtect(globalObject);
- pthread_setspecific(globalObjectKey, globalObject);
- }
-
- ExecState* exec = globalObject->globalExec();
-
- // Discard exceptions -- otherwise an exception would forestall JS
- // evaluation throughout the thread
- exec->clearException();
- return exec;
+ return fValue.get();
}
void JSValueWrapper::GetJSObectCallBacks(JSObjectCallBacks& callBacks)
@@ -112,7 +66,7 @@ void JSValueWrapper::JSObjectDispose(void *data)
CFArrayRef JSValueWrapper::JSObjectCopyPropertyNames(void *data)
{
- JSLock lock;
+ JSLock lock(true);
CFMutableArrayRef result = 0;
JSValueWrapper* ptr = (JSValueWrapper*)data;
@@ -120,7 +74,7 @@ CFArrayRef JSValueWrapper::JSObjectCopyPropertyNames(void *data)
{
ExecState* exec = getThreadGlobalExecState();
JSObject *object = ptr->GetValue()->toObject(exec);
- PropertyNameArray propNames;
+ PropertyNameArray propNames(exec);
object->getPropertyNames(exec, propNames);
PropertyNameArray::const_iterator iterator = propNames.begin();
@@ -147,14 +101,14 @@ CFArrayRef JSValueWrapper::JSObjectCopyPropertyNames(void *data)
JSObjectRef JSValueWrapper::JSObjectCopyProperty(void *data, CFStringRef propertyName)
{
- JSLock lock;
+ JSLock lock(true);
JSObjectRef result = 0;
JSValueWrapper* ptr = (JSValueWrapper*)data;
if (ptr)
{
ExecState* exec = getThreadGlobalExecState();
- JSValue *propValue = ptr->GetValue()->toObject(exec)->get(exec, CFStringToIdentifier(propertyName));
+ JSValue* propValue = ptr->GetValue()->toObject(exec)->get(exec, CFStringToIdentifier(propertyName, exec));
JSValueWrapper* wrapperValue = new JSValueWrapper(propValue);
JSObjectCallBacks callBacks;
@@ -171,21 +125,22 @@ JSObjectRef JSValueWrapper::JSObjectCopyProperty(void *data, CFStringRef propert
void JSValueWrapper::JSObjectSetProperty(void *data, CFStringRef propertyName, JSObjectRef jsValue)
{
- JSLock lock;
+ JSLock lock(true);
JSValueWrapper* ptr = (JSValueWrapper*)data;
if (ptr)
{
ExecState* exec = getThreadGlobalExecState();
- JSValue *value = JSObjectKJSValue((JSUserObject*)jsValue);
+ JSValue* value = JSObjectKJSValue((JSUserObject*)jsValue);
JSObject *objValue = ptr->GetValue()->toObject(exec);
- objValue->put(exec, CFStringToIdentifier(propertyName), value);
+ PutPropertySlot slot;
+ objValue->put(exec, CFStringToIdentifier(propertyName, exec), value, slot);
}
}
JSObjectRef JSValueWrapper::JSObjectCallFunction(void *data, JSObjectRef thisObj, CFArrayRef args)
{
- JSLock lock;
+ JSLock lock(true);
JSObjectRef result = 0;
JSValueWrapper* ptr = (JSValueWrapper*)data;
@@ -193,20 +148,24 @@ JSObjectRef JSValueWrapper::JSObjectCallFunction(void *data, JSObjectRef thisObj
{
ExecState* exec = getThreadGlobalExecState();
- JSValue *value = JSObjectKJSValue((JSUserObject*)thisObj);
+ JSValue* value = JSObjectKJSValue((JSUserObject*)thisObj);
JSObject *ksjThisObj = value->toObject(exec);
JSObject *objValue = ptr->GetValue()->toObject(exec);
- List listArgs;
+ ArgList listArgs;
CFIndex argCount = args ? CFArrayGetCount(args) : 0;
for (CFIndex i = 0; i < argCount; i++)
{
JSObjectRef jsArg = (JSObjectRef)CFArrayGetValueAtIndex(args, i);
- JSValue *kgsArg = JSObjectKJSValue((JSUserObject*)jsArg);
+ JSValue* kgsArg = JSObjectKJSValue((JSUserObject*)jsArg);
listArgs.append(kgsArg);
}
- JSValue *resultValue = objValue->call(exec, ksjThisObj, listArgs);
+ CallData callData;
+ CallType callType = objValue->getCallData(callData);
+ if (callType == CallTypeNone)
+ return 0;
+ JSValue* resultValue = call(exec, objValue, callType, callData, ksjThisObj, listArgs);
JSValueWrapper* wrapperValue = new JSValueWrapper(resultValue);
JSObjectCallBacks callBacks;
GetJSObectCallBacks(callBacks);
@@ -221,7 +180,7 @@ JSObjectRef JSValueWrapper::JSObjectCallFunction(void *data, JSObjectRef thisObj
CFTypeRef JSValueWrapper::JSObjectCopyCFValue(void *data)
{
- JSLock lock;
+ JSLock lock(true);
CFTypeRef result = 0;
JSValueWrapper* ptr = (JSValueWrapper*)data;
diff --git a/JavaScriptGlue/JSValueWrapper.h b/JavaScriptGlue/JSValueWrapper.h
index 5c33297..bd75ad3 100644
--- a/JavaScriptGlue/JSValueWrapper.h
+++ b/JavaScriptGlue/JSValueWrapper.h
@@ -35,12 +35,12 @@
class JSValueWrapper {
public:
- JSValueWrapper(JSValue *inValue);
+ JSValueWrapper(JSValue*);
virtual ~JSValueWrapper();
static void GetJSObectCallBacks(JSObjectCallBacks& callBacks);
- JSValue *GetValue();
+ JSValue* GetValue();
private:
ProtectedPtr<JSValue> fValue;
diff --git a/JavaScriptGlue/JavaScriptGlue.cpp b/JavaScriptGlue/JavaScriptGlue.cpp
index 2365bd2..2b91178 100644
--- a/JavaScriptGlue/JavaScriptGlue.cpp
+++ b/JavaScriptGlue/JavaScriptGlue.cpp
@@ -32,6 +32,8 @@
#include "JSBase.h"
#include "JSObject.h"
#include "JSRun.h"
+#include <JavaScriptCore/completion.h>
+#include <JavaScriptCore/InitializeThreading.h>
static CFTypeRef sJSCFNullRef = 0;
@@ -239,10 +241,12 @@ JSObjectRef JSObjectCallFunction(JSObjectRef ref, JSObjectRef thisObj, CFArrayRe
*/
JSRunRef JSRunCreate(CFStringRef jsSource, JSFlags inFlags)
{
+ initializeThreading();
+
JSRunRef result = 0;
if (jsSource)
{
- JSLock lock;
+ JSLock lock(true);
result = (JSRunRef) new JSRun(jsSource, inFlags);
}
return result;
@@ -287,7 +291,7 @@ JSObjectRef JSRunEvaluate(JSRunRef ref)
JSRun* ptr = (JSRun*)ref;
if (ptr)
{
- JSLock lock;
+ JSLock lock(true);
Completion completion = ptr->Evaluate();
if (completion.isValueCompletion())
{
@@ -321,7 +325,7 @@ bool JSRunCheckSyntax(JSRunRef ref)
JSRun* ptr = (JSRun*)ref;
if (ptr)
{
- JSLock lock;
+ JSLock lock(true);
result = ptr->CheckSyntax();
}
return result;
@@ -330,10 +334,12 @@ bool JSRunCheckSyntax(JSRunRef ref)
/*
JSCollect - trigger garbage collection
*/
-void JSCollect(void)
+void JSCollect()
{
- JSLock lock;
- Collector::collect();
+ initializeThreading();
+
+ JSLock lock(true);
+ getThreadGlobalExecState()->heap()->collect();
}
/*
@@ -614,6 +620,8 @@ CFMutableArrayRef JSCreateCFArrayFromJSArray(CFArrayRef array)
CFMutableArrayRef JSCreateJSArrayFromCFArray(CFArrayRef array)
{
+ initializeThreading();
+
CFIndex count = array ? CFArrayGetCount(array) : 0;
CFArrayCallBacks arrayCallbacks;
CFMutableArrayRef jsArray;
@@ -640,12 +648,12 @@ CFMutableArrayRef JSCreateJSArrayFromCFArray(CFArrayRef array)
void JSLockInterpreter()
{
- JSLock::lock();
- JSLock::registerThread();
+ initializeThreading();
+ JSLock::lock(true);
}
void JSUnlockInterpreter()
{
- JSLock::unlock();
+ JSLock::unlock(true);
}
diff --git a/JavaScriptGlue/JavaScriptGlue.xcodeproj/project.pbxproj b/JavaScriptGlue/JavaScriptGlue.xcodeproj/project.pbxproj
index 4ee61da..ea6f419 100644
--- a/JavaScriptGlue/JavaScriptGlue.xcodeproj/project.pbxproj
+++ b/JavaScriptGlue/JavaScriptGlue.xcodeproj/project.pbxproj
@@ -43,41 +43,6 @@
DD66F3F608F7401B00C75FD7 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD66F3F508F7401B00C75FD7 /* JavaScriptCore.framework */; };
/* End PBXBuildFile section */
-/* Begin PBXBuildRule section */
- 1C8715620B0BA46200E3CB7B /* PBXBuildRule */ = {
- isa = PBXBuildRule;
- compilerSpec = com.apple.compilers.gcc.4_0;
- fileType = sourcecode.cpp;
- isEditable = 1;
- outputFiles = (
- );
- };
- 1C8715630B0BA46200E3CB7B /* PBXBuildRule */ = {
- isa = PBXBuildRule;
- compilerSpec = com.apple.compilers.gcc.4_0;
- fileType = sourcecode.c;
- isEditable = 1;
- outputFiles = (
- );
- };
- 5D89690E0BB521EE009477BE /* PBXBuildRule */ = {
- isa = PBXBuildRule;
- compilerSpec = com.apple.compilers.gcc.4_0;
- fileType = sourcecode.c;
- isEditable = 1;
- outputFiles = (
- );
- };
- 5D8969150BB52209009477BE /* PBXBuildRule */ = {
- isa = PBXBuildRule;
- compilerSpec = com.apple.compilers.gcc.4_0;
- fileType = sourcecode.cpp;
- isEditable = 1;
- outputFiles = (
- );
- };
-/* End PBXBuildRule section */
-
/* Begin PBXContainerItemProxy section */
1422E8C709DE3EAD00749B87 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
@@ -112,7 +77,7 @@
1C9051A00BA9F3050081E9D0 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
1C9051A10BA9F3050081E9D0 /* JavaScriptGlue.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = JavaScriptGlue.xcconfig; sourceTree = "<group>"; };
1C9051A20BA9F3050081E9D0 /* Version.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = "<group>"; };
- DD66F3D508F73ED700C75FD7 /* Info.plist */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+ DD66F3D508F73ED700C75FD7 /* Info.plist */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
DD66F3D608F73ED700C75FD7 /* JavaScriptGlue.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JavaScriptGlue.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DD66F3F508F7401B00C75FD7 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F11798B20262465703CA149D /* JavaScriptGlue.cpp */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JavaScriptGlue.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
@@ -283,8 +248,6 @@
1422E87509DE3BE800749B87 /* Frameworks */,
);
buildRules = (
- 5D8969150BB52209009477BE /* PBXBuildRule */,
- 5D89690E0BB521EE009477BE /* PBXBuildRule */,
);
dependencies = (
5D2F21E30BDFAB9D0082B294 /* PBXTargetDependency */,
@@ -303,11 +266,11 @@
DD66F3C208F73ED700C75FD7 /* Resources */,
DD66F3C408F73ED700C75FD7 /* Sources */,
939D055E09DA033400984996 /* Check For Global Initializers */,
+ 5D0D53490E9862A70029E223 /* Check For Weak VTables */,
DD66F3CD08F73ED700C75FD7 /* Frameworks */,
+ 5DA0F0C00DC2B48900EA22B4 /* Remove Headers If Needed */,
);
buildRules = (
- 1C8715620B0BA46200E3CB7B /* PBXBuildRule */,
- 1C8715630B0BA46200E3CB7B /* PBXBuildRule */,
);
dependencies = (
);
@@ -349,6 +312,20 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
+ 5D0D53490E9862A70029E223 /* Check For Weak VTables */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Check For Weak VTables";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "if [ -f ../WebKitTools/Scripts/check-for-weak-vtables ]; then\n ../WebKitTools/Scripts/check-for-weak-vtables || exit $?\nfi";
+ };
5D2F7D0A0C6878E000B5B72B /* Update Info.plist with version information */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -365,6 +342,20 @@
shellPath = /bin/sh;
shellScript = "# Touch Info.plist to let Xcode know it needs to copy it into the built product\ntouch \"$SRCROOT/Info.plist\"\n";
};
+ 5DA0F0C00DC2B48900EA22B4 /* Remove Headers If Needed */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Remove Headers If Needed";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "if (( MAC_OS_X_VERSION_MAJOR > 1050 )); then\n rm -rf \"$BUILT_PRODUCTS_DIR/$PUBLIC_HEADERS_FOLDER_PATH\"/*.h;\nfi;\n";
+ };
939D055E09DA033400984996 /* Check For Global Initializers */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -503,8 +494,9 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 1C9051A00BA9F3050081E9D0 /* DebugRelease.xcconfig */;
buildSettings = {
- GCC_OPTIMIZATION_LEVEL = 0;
- STRIP_INSTALLED_PRODUCT = NO;
+ DEBUG_DEFINES = "$(DEBUG_DEFINES_debug)";
+ GCC_OPTIMIZATION_LEVEL = "$(GCC_OPTIMIZATION_LEVEL_debug)";
+ STRIP_INSTALLED_PRODUCT = "$(STRIP_INSTALLED_PRODUCT_debug)";
};
name = Debug;
};
@@ -527,7 +519,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 1C9051A10BA9F3050081E9D0 /* JavaScriptGlue.xcconfig */;
buildSettings = {
- DEBUG_DEFINES = "";
INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)";
};
name = Debug;
@@ -536,7 +527,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 1C9051A10BA9F3050081E9D0 /* JavaScriptGlue.xcconfig */;
buildSettings = {
- DEBUG_DEFINES = NDEBUG;
INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)";
};
name = Release;
@@ -545,7 +535,10 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 1C9051A10BA9F3050081E9D0 /* JavaScriptGlue.xcconfig */;
buildSettings = {
- DEBUG_DEFINES = NDEBUG;
+ BUILD_VARIANTS = (
+ normal,
+ debug,
+ );
SECTORDER_FLAGS = (
"-sectorder",
__TEXT,
diff --git a/JavaScriptGlue/UserObjectImp.cpp b/JavaScriptGlue/UserObjectImp.cpp
index 20c06c3..eb3bced 100644
--- a/JavaScriptGlue/UserObjectImp.cpp
+++ b/JavaScriptGlue/UserObjectImp.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,12 +28,15 @@
#include "config.h"
#include "UserObjectImp.h"
+
+#include <JavaScriptCore/JSString.h>
#include <JavaScriptCore/PropertyNameArray.h>
-const ClassInfo UserObjectImp::info = { "UserObject", 0, 0 };
+const ClassInfo UserObjectImp::info = { "UserObject", 0, 0, 0 };
-UserObjectImp::UserObjectImp(JSUserObject* userObject)
- : fJSUserObject((JSUserObject*)userObject->Retain())
+UserObjectImp::UserObjectImp(PassRefPtr<StructureID> structure, JSUserObject* userObject)
+ : JSObject(structure)
+ , fJSUserObject((JSUserObject*)userObject->Retain())
{
}
@@ -48,14 +51,14 @@ const ClassInfo * UserObjectImp::classInfo() const
return &info;
}
-bool UserObjectImp::implementsCall() const
+CallType UserObjectImp::getCallData(CallData& callData)
{
- return fJSUserObject ? fJSUserObject->ImplementsCall() : false;
+ return fJSUserObject ? fJSUserObject->getCallData(callData) : CallTypeNone;
}
-JSValue *UserObjectImp::callAsFunction(ExecState *exec, JSObject *thisObj, const List &args)
+JSValue* UserObjectImp::callAsFunction(ExecState *exec, JSObject *thisObj, const ArgList &args)
{
- JSValue *result = jsUndefined();
+ JSValue* result = jsUndefined();
JSUserObject* jsThisObj = KJSValueToJSObject(thisObj, exec);
if (jsThisObj) {
CFIndex argCount = args.size();
@@ -64,7 +67,7 @@ JSValue *UserObjectImp::callAsFunction(ExecState *exec, JSObject *thisObj, const
CFMutableArrayRef jsArgs = CFArrayCreateMutable(0, 0, &arrayCallBacks);
if (jsArgs) {
for (CFIndex i = 0; i < argCount; i++) {
- JSUserObject* jsArg = KJSValueToJSObject(args[i], exec);
+ JSUserObject* jsArg = KJSValueToJSObject(args.at(exec, i), exec);
CFArrayAppendValue(jsArgs, (void*)jsArg);
jsArg->Release();
}
@@ -72,9 +75,9 @@ JSValue *UserObjectImp::callAsFunction(ExecState *exec, JSObject *thisObj, const
JSUserObject* jsResult;
{ // scope
- JSLock::DropAllLocks dropLocks;
+ JSLock::DropAllLocks dropLocks(exec);
- // implementsCall should have guarded against a NULL fJSUserObject.
+ // getCallData should have guarded against a NULL fJSUserObject.
assert(fJSUserObject);
jsResult = fJSUserObject->CallFunction(jsThisObj, jsArgs);
}
@@ -101,7 +104,7 @@ void UserObjectImp::getPropertyNames(ExecState *exec, PropertyNameArray& propert
CFIndex i;
for (i = 0; i < count; i++) {
CFStringRef propertyName = (CFStringRef)CFArrayGetValueAtIndex(cfPropertyNames, i);
- propertyNames.add(CFStringToIdentifier(propertyName));
+ propertyNames.add(CFStringToIdentifier(propertyName, exec));
}
CFRelease(cfPropertyNames);
}
@@ -109,16 +112,16 @@ void UserObjectImp::getPropertyNames(ExecState *exec, PropertyNameArray& propert
JSObject::getPropertyNames(exec, propertyNames);
}
-JSValue *UserObjectImp::userObjectGetter(ExecState *, JSObject *, const Identifier& propertyName, const PropertySlot& slot)
+JSValue* UserObjectImp::userObjectGetter(ExecState*, const Identifier& propertyName, const PropertySlot& slot)
{
- UserObjectImp *thisObj = static_cast<UserObjectImp *>(slot.slotBase());
+ UserObjectImp *thisObj = static_cast<UserObjectImp *>(asObject(slot.slotBase()));
// getOwnPropertySlot should have guarded against a null fJSUserObject.
assert(thisObj->fJSUserObject);
CFStringRef cfPropName = IdentifierToCFString(propertyName);
JSUserObject *jsResult = thisObj->fJSUserObject->CopyProperty(cfPropName);
ReleaseCFType(cfPropName);
- JSValue *result = JSObjectKJSValue(jsResult);
+ JSValue* result = JSObjectKJSValue(jsResult);
jsResult->Release();
return result;
@@ -137,8 +140,8 @@ bool UserObjectImp::getOwnPropertySlot(ExecState *exec, const Identifier& proper
jsResult->Release();
return true;
} else {
- JSValue *kjsValue = toPrimitive(exec);
- if (kjsValue->type() != NullType && kjsValue->type() != UndefinedType) {
+ JSValue* kjsValue = toPrimitive(exec);
+ if (!kjsValue->isUndefinedOrNull()) {
JSObject *kjsObject = kjsValue->toObject(exec);
if (kjsObject->getPropertySlot(exec, propertyName, slot))
return true;
@@ -147,7 +150,7 @@ bool UserObjectImp::getOwnPropertySlot(ExecState *exec, const Identifier& proper
return JSObject::getOwnPropertySlot(exec, propertyName, slot);
}
-void UserObjectImp::put(ExecState *exec, const Identifier &propertyName, JSValue *value, int attr)
+void UserObjectImp::put(ExecState *exec, const Identifier &propertyName, JSValue* value, int attr)
{
if (!fJSUserObject)
return;
@@ -166,9 +169,9 @@ JSUserObject* UserObjectImp::GetJSUserObject() const
return fJSUserObject;
}
-JSValue *UserObjectImp::toPrimitive(ExecState *exec, JSType preferredType) const
+JSValue* UserObjectImp::toPrimitive(ExecState *exec, JSType) const
{
- JSValue *result = jsUndefined();
+ JSValue* result = jsUndefined();
JSUserObject* jsObjPtr = KJSValueToJSObject(toObject(exec), exec);
CFTypeRef cfValue = jsObjPtr ? jsObjPtr->CopyCFValue() : 0;
if (cfValue) {
@@ -183,15 +186,15 @@ JSValue *UserObjectImp::toPrimitive(ExecState *exec, JSType preferredType) const
result = jsBoolean(false);
}
} else if (cfType == CFStringGetTypeID()) {
- result = jsString(CFStringToUString((CFStringRef)cfValue));
+ result = jsString(exec, CFStringToUString((CFStringRef)cfValue));
} else if (cfType == CFNumberGetTypeID()) {
double d = 0.0;
CFNumberGetValue((CFNumberRef)cfValue, kCFNumberDoubleType, &d);
- result = jsNumber(d);
+ result = jsNumber(exec, d);
} else if (cfType == CFURLGetTypeID()) {
CFURLRef absURL = CFURLCopyAbsoluteURL((CFURLRef)cfValue);
if (absURL) {
- result = jsString(CFStringToUString(CFURLGetString(absURL)));
+ result = jsString(exec, CFStringToUString(CFURLGetString(absURL)));
ReleaseCFType(absURL);
}
}
diff --git a/JavaScriptGlue/UserObjectImp.h b/JavaScriptGlue/UserObjectImp.h
index 54e5ab6..952d2fe 100644
--- a/JavaScriptGlue/UserObjectImp.h
+++ b/JavaScriptGlue/UserObjectImp.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -32,25 +32,25 @@
#include "JSUtils.h"
#include "JSBase.h"
#include "JSObject.h"
+#include <JavaScriptCore/JSType.h>
-class UserObjectImp : public JSObject
-{
+class UserObjectImp : public JSObject {
public:
- UserObjectImp(JSUserObject* userObject);
+ UserObjectImp(PassRefPtr<StructureID>, JSUserObject*);
virtual ~UserObjectImp();
virtual const ClassInfo *classInfo() const;
static const ClassInfo info;
- virtual bool implementsCall() const;
+ virtual CallType getCallData(CallData&);
virtual void getPropertyNames(ExecState*, PropertyNameArray&);
- virtual JSValue *callAsFunction(ExecState *exec, JSObject *thisObj, const List &args);
+ virtual JSValue* callAsFunction(ExecState *exec, JSObject *thisObj, const ArgList &args);
virtual bool getOwnPropertySlot(ExecState *, const Identifier&, PropertySlot&);
- virtual void put(ExecState *exec, const Identifier &propertyName, JSValue *value, int attr = None);
+ virtual void put(ExecState *exec, const Identifier &propertyName, JSValue* value, int attr = None);
- JSValue *toPrimitive(ExecState *exec, JSType preferredType = UnspecifiedType) const;
+ JSValue* toPrimitive(ExecState*, JSType preferredType = UnspecifiedType) const;
virtual bool toBoolean(ExecState *exec) const;
virtual double toNumber(ExecState *exec) const;
virtual UString toString(ExecState *exec) const;
@@ -58,8 +58,14 @@ public:
virtual void mark();
JSUserObject *GetJSUserObject() const;
+
+ static PassRefPtr<StructureID> createStructureID(JSValue* prototype)
+ {
+ return StructureID::create(prototype, TypeInfo(ObjectType));
+ }
+
private:
- static JSValue *userObjectGetter(ExecState *, JSObject *originalObject, const Identifier& propertyName, const PropertySlot&);
+ static JSValue* userObjectGetter(ExecState*, const Identifier& propertyName, const PropertySlot&);
JSUserObject* fJSUserObject;
};
diff --git a/JavaScriptGlue/config.h b/JavaScriptGlue/config.h
index 3651785..bda9cc4 100644
--- a/JavaScriptGlue/config.h
+++ b/JavaScriptGlue/config.h
@@ -3,5 +3,5 @@
#endif
#include <wtf/Platform.h>
-#include <kjs/ExecState.h>
+#include <runtime/ExecState.h>
diff --git a/JavaScriptGlue/icu/unicode/utf_old.h b/JavaScriptGlue/icu/unicode/utf_old.h
index e69de29..8504a03 100644
--- a/JavaScriptGlue/icu/unicode/utf_old.h
+++ b/JavaScriptGlue/icu/unicode/utf_old.h
@@ -0,0 +1 @@
+/* This file is intentionally left blank. */