Title: [218379] trunk/Source/_javascript_Core
Revision
218379
Author
commit-qu...@webkit.org
Date
2017-06-15 20:55:43 -0700 (Thu, 15 Jun 2017)

Log Message

[Cocoa] Modernize some internal initializers to use instancetype instead of id
https://bugs.webkit.org/show_bug.cgi?id=173112

Patch by Joseph Pecoraro <pecor...@apple.com> on 2017-06-15
Reviewed by Wenson Hsieh.

* API/JSContextInternal.h:
* API/JSWrapperMap.h:
* API/JSWrapperMap.mm:
(-[JSObjCClassInfo initForClass:]):
(-[JSWrapperMap initWithGlobalContextRef:]):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/API/JSContextInternal.h (218378 => 218379)


--- trunk/Source/_javascript_Core/API/JSContextInternal.h	2017-06-16 03:26:55 UTC (rev 218378)
+++ trunk/Source/_javascript_Core/API/JSContextInternal.h	2017-06-16 03:55:43 UTC (rev 218379)
@@ -59,7 +59,7 @@
 
 @interface JSContext(Internal)
 
-- (id)initWithGlobalContextRef:(JSGlobalContextRef)context;
+- (instancetype)initWithGlobalContextRef:(JSGlobalContextRef)context;
 
 - (void)notifyException:(JSValueRef)exception;
 - (JSValue *)valueFromNotifyException:(JSValueRef)exception;

Modified: trunk/Source/_javascript_Core/API/JSWrapperMap.h (218378 => 218379)


--- trunk/Source/_javascript_Core/API/JSWrapperMap.h	2017-06-16 03:26:55 UTC (rev 218378)
+++ trunk/Source/_javascript_Core/API/JSWrapperMap.h	2017-06-16 03:55:43 UTC (rev 218379)
@@ -31,7 +31,7 @@
 
 @interface JSWrapperMap : NSObject
 
-- (id)initWithGlobalContextRef:(JSGlobalContextRef)context;
+- (instancetype)initWithGlobalContextRef:(JSGlobalContextRef)context;
 
 - (JSValue *)jsWrapperForObject:(id)object inContext:(JSContext *)context;
 

Modified: trunk/Source/_javascript_Core/API/JSWrapperMap.mm (218378 => 218379)


--- trunk/Source/_javascript_Core/API/JSWrapperMap.mm	2017-06-16 03:26:55 UTC (rev 218378)
+++ trunk/Source/_javascript_Core/API/JSWrapperMap.mm	2017-06-16 03:55:43 UTC (rev 218379)
@@ -371,7 +371,7 @@
     JSC::Weak<JSC::JSObject> m_constructor;
 }
 
-- (id)initForClass:(Class)cls;
+- (instancetype)initForClass:(Class)cls;
 - (JSC::JSObject *)wrapperForObject:(id)object inContext:(JSContext *)context;
 - (JSC::JSObject *)constructorInContext:(JSContext *)context;
 - (JSC::JSObject *)prototypeInContext:(JSContext *)context;
@@ -380,7 +380,7 @@
 
 @implementation JSObjCClassInfo
 
-- (id)initForClass:(Class)cls
+- (instancetype)initForClass:(Class)cls
 {
     self = [super init];
     if (!self)
@@ -552,7 +552,7 @@
     NSMapTable *m_cachedObjCWrappers;
 }
 
-- (id)initWithGlobalContextRef:(JSGlobalContextRef)context
+- (instancetype)initWithGlobalContextRef:(JSGlobalContextRef)context
 {
     self = [super init];
     if (!self)

Modified: trunk/Source/_javascript_Core/ChangeLog (218378 => 218379)


--- trunk/Source/_javascript_Core/ChangeLog	2017-06-16 03:26:55 UTC (rev 218378)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-06-16 03:55:43 UTC (rev 218379)
@@ -1,3 +1,16 @@
+2017-06-15  Joseph Pecoraro  <pecor...@apple.com>
+
+        [Cocoa] Modernize some internal initializers to use instancetype instead of id
+        https://bugs.webkit.org/show_bug.cgi?id=173112
+
+        Reviewed by Wenson Hsieh.
+
+        * API/JSContextInternal.h:
+        * API/JSWrapperMap.h:
+        * API/JSWrapperMap.mm:
+        (-[JSObjCClassInfo initForClass:]):
+        (-[JSWrapperMap initWithGlobalContextRef:]):
+
 2017-06-15  Matt Baker  <mattba...@apple.com>
 
         Web Inspector: Instrument 2D/WebGL canvas contexts in the backend
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to