Objective-C JavaScriptCore API should publicly support bridging to C
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Apr 2013 21:55:43 +0000 (21:55 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Apr 2013 21:55:43 +0000 (21:55 +0000)
commit40d9aacb25ac58b35549ab83b69f4a0095085f26
tree3dde5e1a6fdcb32e7c16c4d8549b84dca26aa869
parent679d6520ec9ed5ade6d2554404cbfbcd0e033bcc
Objective-C JavaScriptCore API should publicly support bridging to C
https://bugs.webkit.org/show_bug.cgi?id=115447

Reviewed by Mark Hahnenberg.

../JavaScriptCore:

For consistency, I renamed

    +[JSValue valueWithValue:] => +[JSValue valueWithJSValueRef]
    +[JSContext contextWithGlobalContextRef] => +[JSContext contextWithJSGlobalContextRef]
    -[JSContext globalContext] => -[JSContext JSGlobalContextRef]

I searched svn to verify that these functions don't have clients yet,
so we won't break anything.

I also exported as public API

    +[JSValue valueWithJSValueRef:]
    +[JSContext contextWithJSGlobalContextRef:]

It's hard to integrate with the C API without these.

../WebCore:

* bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::javaScriptContext):
* bindings/objc/WebScriptObject.mm:
(-[WebScriptObject JSValue]):

../WebKit/mac:

* WebView/WebFrame.mm:
(-[WebFrame _javaScriptContextForScriptWorld:]):
* WebView/WebScriptWorld.mm:
(+[WebScriptWorld scriptWorldForJavaScriptContext:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@149401 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/JavaScriptCore/API/JSContext.h
Source/JavaScriptCore/API/JSContext.mm
Source/JavaScriptCore/API/JSContextInternal.h
Source/JavaScriptCore/API/JSManagedValue.mm
Source/JavaScriptCore/API/JSValue.h
Source/JavaScriptCore/API/JSValue.mm
Source/JavaScriptCore/API/JSValueInternal.h
Source/JavaScriptCore/API/JSVirtualMachine.mm
Source/JavaScriptCore/API/JSWrapperMap.mm
Source/JavaScriptCore/API/ObjCCallbackFunction.mm
Source/JavaScriptCore/API/tests/testapi.mm
Source/JavaScriptCore/ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/ScriptControllerMac.mm
Source/WebCore/bindings/objc/WebScriptObject.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebFrame.mm
Source/WebKit/mac/WebView/WebScriptWorld.mm