Changeset 34598 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jun 16, 2008, 6:39:59 AM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSNode.c
r29991 r34598 1 / / -*- mode: c++; c-basic-offset: 4 -*-1 /* -*- mode: c; c-basic-offset: 4 -*- */ 2 2 /* 3 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. … … 39 39 UNUSED_PARAM(function); 40 40 41 / / Example of throwing a type error for invalid values41 /* Example of throwing a type error for invalid values */ 42 42 if (!JSValueIsObjectOfClass(context, thisObject, JSNode_class(context))) { 43 43 JSStringRef message = JSStringCreateWithUTF8CString("TypeError: appendChild can only be called on nodes"); … … 61 61 { 62 62 UNUSED_PARAM(function); 63 64 / / Example of ignoring invalid values63 64 /* Example of ignoring invalid values */ 65 65 if (argumentCount > 0) { 66 66 if (JSValueIsObjectOfClass(context, thisObject, JSNode_class(context))) { -
trunk/JavaScriptCore/API/JSNode.h
r29663 r34598 1 / / -*- mode: c++; c-basic-offset: 4 -*-1 /* -*- mode: c; c-basic-offset: 4 -*- */ 2 2 /* 3 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. … … 36 36 extern JSObjectRef JSNode_construct(JSContextRef context, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); 37 37 38 #endif / / JSNode_h38 #endif /* JSNode_h */ -
trunk/JavaScriptCore/API/JSNodeList.c
r29991 r34598 1 / / -*- mode: c++; c-basic-offset: 4 -*-1 /* -*- mode: c; c-basic-offset: 4 -*- */ 2 2 /* 3 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. … … 73 73 double index = JSValueToNumber(context, JSValueMakeString(context, propertyName), exception); 74 74 unsigned uindex = (unsigned)index; 75 if (uindex == index) { / / false for NaN75 if (uindex == index) { /* false for NaN */ 76 76 Node* node = NodeList_item(nodeList, uindex); 77 77 if (node) -
trunk/JavaScriptCore/API/JSNodeList.h
r29663 r34598 1 / / -*- mode: c++; c-basic-offset: 4 -*-1 /* -*- mode: c; c-basic-offset: 4 -*- */ 2 2 /* 3 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. … … 33 33 extern JSObjectRef JSNodeList_new(JSContextRef, NodeList*); 34 34 35 #endif / / JSNodeList_h35 #endif /* JSNodeList_h */ -
trunk/JavaScriptCore/API/Node.c
r29672 r34598 1 / / -*- mode: c++; c-basic-offset: 4 -*-1 /* -*- mode: c; c-basic-offset: 4 -*- */ 2 2 /* 3 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. … … 50 50 void Node_removeChild(Node* node, Node* child) 51 51 { 52 / / Linear search from tail -- good enough for our purposes here52 /* Linear search from tail -- good enough for our purposes here */ 53 53 NodeLink* current; 54 54 NodeLink** currentHandle; … … 65 65 void Node_replaceChild(Node* node, Node* newChild, Node* oldChild) 66 66 { 67 / / Linear search from tail -- good enough for our purposes here67 /* Linear search from tail -- good enough for our purposes here */ 68 68 NodeLink* current; 69 69 for (current = node->childNodesTail; current; current = current->prev) { -
trunk/JavaScriptCore/API/Node.h
r29663 r34598 1 / / -*- mode: c++; c-basic-offset: 4 -*-1 /* -*- mode: c++; c-basic-offset: 4 -*- */ 2 2 /* 3 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. … … 49 49 extern void Node_replaceChild(Node* node, Node* newChild, Node* oldChild); 50 50 51 #endif / / Node_h51 #endif /* Node_h */ -
trunk/JavaScriptCore/API/NodeList.c
r29672 r34598 1 / / -*- mode: c++; c-basic-offset: 4 -*-1 /* -*- mode: c++; c-basic-offset: 4 -*- */ 2 2 /* 3 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. … … 32 32 { 33 33 Node_ref(parentNode); 34 34 35 35 NodeList* nodeList = (NodeList*)malloc(sizeof(NodeList)); 36 36 nodeList->parentNode = parentNode; … … 41 41 extern unsigned NodeList_length(NodeList* nodeList) 42 42 { 43 / / Linear count from tail -- good enough for our purposes here43 /* Linear count from tail -- good enough for our purposes here */ 44 44 unsigned i = 0; 45 45 NodeLink* n = nodeList->parentNode->childNodesTail; … … 57 57 if (index >= length) 58 58 return NULL; 59 60 / / Linear search from tail -- good enough for our purposes here59 60 /* Linear search from tail -- good enough for our purposes here */ 61 61 NodeLink* n = nodeList->parentNode->childNodesTail; 62 62 unsigned i = 0; -
trunk/JavaScriptCore/API/NodeList.h
r29663 r34598 1 / / -*- mode: c++; c-basic-offset: 4 -*-1 /* -*- mode: c++; c-basic-offset: 4 -*- */ 2 2 /* 3 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. … … 41 41 extern void NodeList_deref(NodeList*); 42 42 43 #endif / / NodeList_h43 #endif /* NodeList_h */ -
trunk/JavaScriptCore/API/minidom.c
r34273 r34598 1 / / -*- mode: c++; c-basic-offset: 4 -*-1 /* -*- mode: c; c-basic-offset: 4 -*- */ 2 2 /* 3 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. … … 114 114 while (!feof(f) && !ferror(f)) { 115 115 buffer_size += fread(buffer + buffer_size, 1, buffer_capacity - buffer_size, f); 116 if (buffer_size == buffer_capacity) { / / guarantees space for trailing '\0'116 if (buffer_size == buffer_capacity) { /* guarantees space for trailing '\0' */ 117 117 buffer_capacity *= 2; 118 118 buffer = (char*)realloc(buffer, buffer_capacity); -
trunk/JavaScriptCore/ChangeLog
r34597 r34598 1 2008-06-16 Christian Dywan <[email protected]> 2 3 Reviewed by Sam. 4 5 https://bugs.webkit.org/show_bug.cgi?id=19557 6 (JavaScriptCore) minidom uses C++ style comments 7 8 Use only C style comments in minidom sources 9 10 * API/JSNode.c: 11 (JSNode_appendChild): 12 (JSNode_removeChild): 13 * API/JSNode.h: 14 * API/JSNodeList.c: 15 (JSNodeList_getProperty): 16 * API/JSNodeList.h: 17 * API/Node.c: 18 * API/Node.h: 19 * API/NodeList.c: 20 (NodeList_new): 21 (NodeList_item): 22 * API/NodeList.h: 23 * API/minidom.c: 24 (createStringWithContentsOfFile): 25 * wtf/Assertions.h: 26 * wtf/UnusedParam.h: 27 1 28 2008-06-16 Adriaan de Groot <[email protected]> 2 29 -
trunk/JavaScriptCore/wtf/Assertions.h
r27947 r34598 1 /* -*- mode: c ++; c-basic-offset: 4 -*- */1 /* -*- mode: c; c-basic-offset: 4 -*- */ 2 2 /* 3 3 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. … … 84 84 #endif 85 85 86 / /WTF logging functions can process %@ in the format string to log a NSObject* but the printf format attribute87 //emits a warning when %@ is used in the format string. Until <rdar://problem/5195437> is resolved we can't include88 // the attribute when being used from Objective-C code in case it decides to use %@. 86 /* WTF logging functions can process %@ in the format string to log a NSObject* but the printf format attribute 87 emits a warning when %@ is used in the format string. Until <rdar://problem/5195437> is resolved we can't include 88 the attribute when being used from Objective-C code in case it decides to use %@. */ 89 89 #if COMPILER(GCC) && !defined(__OBJC__) 90 90 #define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments) __attribute__((__format__(printf, formatStringArgument, extraArguments))) … … 155 155 } \ 156 156 while (0) 157 #endif / / COMPILER(MSVC7)157 #endif /* COMPILER(MSVC7) */ 158 158 #define ASSERT_NOT_REACHED() do { \ 159 159 WTFReportAssertionFailure(__FILE__, __LINE__, WTF_PRETTY_FUNCTION, 0); \ … … 230 230 #endif 231 231 232 #endif / / WTF_Assertions_h232 #endif /* WTF_Assertions_h */ -
trunk/JavaScriptCore/wtf/UnusedParam.h
r17127 r34598 1 /* -*- mode: c ++; c-basic-offset: 4 -*- */1 /* -*- mode: c; c-basic-offset: 4 -*- */ 2 2 /* 3 3 * Copyright (C) 2006 Apple Computer, Inc. … … 28 28 #define UNUSED_PARAM(x) (void)x 29 29 30 #endif / / WTF_UnusedParam_h30 #endif /* WTF_UnusedParam_h */
Note:
See TracChangeset
for help on using the changeset viewer.