Changeset 207542 in webkit


Ignore:
Timestamp:
Oct 19, 2016 10:18:27 AM (8 years ago)
Author:
mitz@apple.com
Message:

[Xcode] JavaScriptCore fails to build when CLANG_WARN_DOCUMENTATION_COMMENTS is enabled
https://bugs.webkit.org/show_bug.cgi?id=163642

Reviewed by Darin Adler.

  • API/JSClassRef.cpp: Removed a bad headerdoc comment inside an implementation file.
  • API/JSContext.h: Changed @methodgroup to @functiongroup, because the compiler requires the former to be followed by a method (and we have a property), but not the latter. Changed a couple of instances of “method” to “@method”. Removed empty @param entries.
  • API/JSContextRefInternal.h: Named a parameter referenced in a @param entry.
  • API/JSContextRefPrivate.h: Ditto.
  • API/JSManagedValue.h: Removed empty @param entries.
  • API/JSObjectRef.h: Corrected parameter name in @param entry.
  • API/JSTypedArray.h: Ditto.
  • API/JSValue.h: Removed empty @param entries, changed @methodgroup to @functiongroup, and changed @method to @property where appropriate. Removed empty @param entries.
  • API/JSValueRef.h: Named a parameter referenced in a @param entry.
  • API/JSWeakObjectMapRefPrivate.h: Ditto.
  • Configurations/Base.xcconfig: Enabled CLANG_WARN_DOCUMENTATION_COMMENTS. Made the compiler treat the icu headers as system headers, to stop it from emitting warnings about headers we don’t want to change.
  • Configurations/ToolExecutable.xcconfig: Made the compiler treat the icu headers as system headers.
Location:
trunk/Source/JavaScriptCore
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSClassRef.cpp

    r197467 r207542  
    175175}
    176176
    177 /*!
    178 // Doc here in case we make this public. (Hopefully we won't.)
    179 @function
    180  @abstract Returns the prototype that will be used when constructing an object with a given class.
    181  @param ctx The execution context to use.
    182  @param jsClass A JSClass whose prototype you want to get.
    183  @result The JSObject prototype that was automatically generated for jsClass, or NULL if no prototype was automatically generated. This is the prototype that will be used when constructing an object using jsClass.
    184 */
    185177JSObject* OpaqueJSClass::prototype(ExecState* exec)
    186178{
  • trunk/Source/JavaScriptCore/API/JSContext.h

    r191230 r207542  
    126126
    127127/*!
    128 @methodgroup Global Properties
    129 */
     128@functiongroup Global Properties
     129*/
     130
    130131/*!
    131132@property
     
    198199
    199200/*!
    200 method
     201@method
    201202@abstract Get a particular property on the global object.
    202 @param key
    203203@result The JSValue for the global object's property.
    204204*/
     
    206206
    207207/*!
    208 method
     208@method
    209209@abstract Set a particular property on the global object.
    210 @param object
    211 @param key
    212210*/
    213211- (void)setObject:(id)object forKeyedSubscript:(NSObject <NSCopying> *)key;
     
    224222@method
    225223@abstract Create a JSContext, wrapping its C API counterpart.
    226 @param jsGlobalContextRef
    227224@result The JSContext equivalent of the provided JSGlobalContextRef.
    228225*/
  • trunk/Source/JavaScriptCore/API/JSContextRefInternal.h

    r170589 r207542  
    5151@param runLoop The new value of the setting for the context.
    5252*/
    53 JS_EXPORT void JSGlobalContextSetDebuggerRunLoop(JSGlobalContextRef ctx, CFRunLoopRef) CF_AVAILABLE(10_10, 8_0);
     53JS_EXPORT void JSGlobalContextSetDebuggerRunLoop(JSGlobalContextRef ctx, CFRunLoopRef runLoop) CF_AVAILABLE(10_10, 8_0);
    5454#endif
    5555
  • trunk/Source/JavaScriptCore/API/JSContextRefPrivate.h

    r170589 r207542  
    8686 any scripts.
    8787*/
    88 JS_EXPORT void JSContextGroupSetExecutionTimeLimit(JSContextGroupRef, double limit, JSShouldTerminateCallback, void* context) CF_AVAILABLE(10_6, 7_0);
     88JS_EXPORT void JSContextGroupSetExecutionTimeLimit(JSContextGroupRef group, double limit, JSShouldTerminateCallback callback, void* context) CF_AVAILABLE(10_6, 7_0);
    8989
    9090/*!
     
    9393@param group The JavaScript context group that the time limit is cleared on.
    9494*/
    95 JS_EXPORT void JSContextGroupClearExecutionTimeLimit(JSContextGroupRef) CF_AVAILABLE(10_6, 7_0);
     95JS_EXPORT void JSContextGroupClearExecutionTimeLimit(JSContextGroupRef group) CF_AVAILABLE(10_6, 7_0);
    9696
    9797/*!
     
    125125@abstract Sets the include native call stack when reporting exceptions setting for a context.
    126126@param ctx The JSGlobalContext that you want to change.
    127 @param includeNativeCallStack The new value of the setting for the context.
     127@param includesNativeCallStack The new value of the setting for the context.
    128128*/
    129129JS_EXPORT void JSGlobalContextSetIncludesNativeCallStackWhenReportingExceptions(JSGlobalContextRef ctx, bool includesNativeCallStack) CF_AVAILABLE(10_10, 8_0);
  • trunk/Source/JavaScriptCore/API/JSManagedValue.h

    r191230 r207542  
    5555@method
    5656@abstract Create a JSManagedValue from a JSValue.
    57 @param value
    5857@result The new JSManagedValue.
    5958*/
     
    6463@method
    6564@abstract Create a JSManagedValue.
    66 @param value
    6765@result The new JSManagedValue.
    6866*/
  • trunk/Source/JavaScriptCore/API/JSObjectRef.h

    r165676 r207542  
    187187@param ctx The execution context to use.
    188188@param object The JSObject whose property names are being collected.
    189 @param accumulator A JavaScript property name accumulator in which to accumulate the names of object's properties.
     189@param propertyNames A JavaScript property name accumulator in which to accumulate the names of object's properties.
    190190@discussion If you named your function GetPropertyNames, you would declare it like this:
    191191
  • trunk/Source/JavaScriptCore/API/JSTypedArray.h

    r197983 r207542  
    157157 @function
    158158 @abstract         Returns a pointer to the data buffer that serves as the backing store for a JavaScript Typed Array object.
    159  @param buffer     The Array Buffer object whose internal backing store pointer to return.
     159 @param object     The Array Buffer object whose internal backing store pointer to return.
    160160 @param exception  A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
    161161 @result           A pointer to the raw data buffer that serves as object's backing store or NULL if object is not an Array Buffer object.
  • trunk/Source/JavaScriptCore/API/JSValue.h

    r191230 r207542  
    6969@method
    7070@abstract Create a JavaScript value from a BOOL primitive.
    71 @param value
    7271@param context The JSContext in which the resulting JSValue will be created.
    7372@result The new JSValue representing the equivalent boolean value.
     
    7877@method
    7978@abstract Create a JavaScript value from a double primitive.
    80 @param value
    8179@param context The JSContext in which the resulting JSValue will be created.
    8280@result The new JSValue representing the equivalent boolean value.
     
    8785@method
    8886@abstract Create a JavaScript value from an <code>int32_t</code> primitive.
    89 @param value
    9087@param context The JSContext in which the resulting JSValue will be created.
    9188@result The new JSValue representing the equivalent boolean value.
     
    9693@method
    9794@abstract Create a JavaScript value from a <code>uint32_t</code> primitive.
    98 @param value
    9995@param context The JSContext in which the resulting JSValue will be created.
    10096@result The new JSValue representing the equivalent boolean value.
     
    365361
    366362/*!
    367 @methodgroup Checking JavaScript Types
    368 */
    369 /*!
    370 @method
     363@functiongroup Checking JavaScript Types
     364*/
     365
     366/*!
     367@property
    371368@abstract Check if a JSValue corresponds to the JavaScript value <code>undefined</code>.
    372369*/
     
    374371
    375372/*!
    376 @method
     373@property
    377374@abstract Check if a JSValue corresponds to the JavaScript value <code>null</code>.
    378375*/
     
    380377
    381378/*!
    382 @method
     379@property
    383380@abstract Check if a JSValue is a boolean.
    384381*/
     
    386383
    387384/*!
    388 @method
     385@property
    389386@abstract Check if a JSValue is a number.
    390387@discussion In JavaScript, there is no differentiation between types of numbers.
     
    395392
    396393/*!
    397 @method
     394@property
    398395@abstract Check if a JSValue is a string.
    399396*/
     
    401398
    402399/*!
    403 @method
     400@property
    404401@abstract Check if a JSValue is an object.
    405402*/
     
    407404
    408405/*!
    409 @method
     406@property
    410407@abstract Check if a JSValue is an array.
    411408*/
     
    413410
    414411/*!
    415 @method
     412@property
    416413@abstract Check if a JSValue is a date.
    417414*/
     
    593590@method
    594591@abstract Creates a JSValue, wrapping its C API counterpart.
    595 @param value
    596 @param context
    597592@result The Objective-C API equivalent of the specified JSValueRef.
    598593*/
  • trunk/Source/JavaScriptCore/API/JSValueRef.h

    r197983 r207542  
    9494@result         A value of type JSType that identifies value's type.
    9595*/
    96 JS_EXPORT JSType JSValueGetType(JSContextRef ctx, JSValueRef);
     96JS_EXPORT JSType JSValueGetType(JSContextRef ctx, JSValueRef value);
    9797
    9898/*!
  • trunk/Source/JavaScriptCore/API/JSWeakObjectMapRefPrivate.h

    r95901 r207542  
    6565 @param object The user defined object to associate with the key.
    6666 */
    67 JS_EXPORT void JSWeakObjectMapSet(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSObjectRef);
     67JS_EXPORT void JSWeakObjectMapSet(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSObjectRef object);
    6868
    6969/*!
  • trunk/Source/JavaScriptCore/ChangeLog

    r207532 r207542  
     12016-10-19  Dan Bernstein  <mitz@apple.com>
     2
     3        [Xcode] JavaScriptCore fails to build when CLANG_WARN_DOCUMENTATION_COMMENTS is enabled
     4        https://bugs.webkit.org/show_bug.cgi?id=163642
     5
     6        Reviewed by Darin Adler.
     7
     8        * API/JSClassRef.cpp: Removed a bad headerdoc comment inside an implementation file.
     9        * API/JSContext.h: Changed @methodgroup to @functiongroup, because the compiler requires the
     10          former to be followed by a method (and we have a property), but not the latter. Changed
     11          a couple of instances of “method” to “@method”. Removed empty @param entries.
     12        * API/JSContextRefInternal.h: Named a parameter referenced in a @param entry.
     13        * API/JSContextRefPrivate.h: Ditto.
     14        * API/JSManagedValue.h: Removed empty @param entries.
     15        * API/JSObjectRef.h: Corrected parameter name in @param entry.
     16        * API/JSTypedArray.h: Ditto.
     17        * API/JSValue.h: Removed empty @param entries, changed @methodgroup to @functiongroup, and
     18          changed @method to @property where appropriate. Removed empty @param entries.
     19        * API/JSValueRef.h: Named a parameter referenced in a @param entry.
     20        * API/JSWeakObjectMapRefPrivate.h: Ditto.
     21        * Configurations/Base.xcconfig: Enabled CLANG_WARN_DOCUMENTATION_COMMENTS. Made the compiler
     22          treat the icu headers as system headers, to stop it from emitting warnings about headers
     23          we don’t want to change.
     24        * Configurations/ToolExecutable.xcconfig: Made the compiler treat the icu headers as system
     25          headers.
     26
    1272016-10-19  Csaba Osztrogonác  <ossy@webkit.org>
    228
  • trunk/Source/JavaScriptCore/Configurations/Base.xcconfig

    r205528 r207542  
    7878GCC_WARN_UNUSED_FUNCTION = YES;
    7979GCC_WARN_UNUSED_VARIABLE = YES;
     80CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
    8081PREBINDING = NO;
    8182WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough;
     
    8788LLVM_SYSTEM_HEADER_PATH[sdk=iphoneos*] = /usr/local/include;
    8889
    89 HEADER_SEARCH_PATHS = . icu $(LLVM_LOCAL_HEADER_PATH) "${BUILT_PRODUCTS_DIR}/ExtraIncludesForLocalLLVMBuild" $(LLVM_SYSTEM_HEADER_PATH) "${BUILT_PRODUCTS_DIR}/usr/local/include" $(HEADER_SEARCH_PATHS);
     90HEADER_SEARCH_PATHS = . $(LLVM_LOCAL_HEADER_PATH) "${BUILT_PRODUCTS_DIR}/ExtraIncludesForLocalLLVMBuild" $(LLVM_SYSTEM_HEADER_PATH) "${BUILT_PRODUCTS_DIR}/usr/local/include" $(HEADER_SEARCH_PATHS);
    9091
    9192TARGET_MAC_OS_X_VERSION_MAJOR = $(TARGET_MAC_OS_X_VERSION_MAJOR$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier));
     
    138139SDKROOT = macosx.internal;
    139140
    140 OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
    141 OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
     141OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS) -isystem icu;
     142OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS) -isystem icu;
    142143OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
    143144
  • trunk/Source/JavaScriptCore/Configurations/ToolExecutable.xcconfig

    r207453 r207542  
    4848CLANG_ENABLE_OBJC_ARC_arm64 = YES;
    4949
    50 OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
    51 OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
     50OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS) -isystem icu;
     51OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS) -isystem icu;
    5252OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
    5353
Note: See TracChangeset for help on using the changeset viewer.