Changeset 182297 in webkit for trunk/Source/JavaScriptCore/API/JSValueRef.cpp
- Timestamp:
- Apr 2, 2015, 5:09:42 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSValueRef.cpp
r173326 r182297 28 28 29 29 #include "APICast.h" 30 #include "DateInstance.h" 30 31 #include "JSAPIWrapperObject.h" 32 #include "JSCInlines.h" 31 33 #include "JSCJSValue.h" 32 34 #include "JSCallbackObject.h" … … 35 37 #include "JSString.h" 36 38 #include "LiteralParser.h" 37 #include "JSCInlines.h"38 39 #include "Protect.h" 39 40 #include <algorithm> 40 41 #include <wtf/Assertions.h> 41 42 #include <wtf/text/StringHash.h> 42 43 #include <wtf/text/WTFString.h> 43 44 #include <algorithm> // for std::min45 44 46 45 #if PLATFORM(MAC) … … 99 98 JSLockHolder locker(exec); 100 99 101 JSValue jsValue = toJS(exec, value); 102 return jsValue.isUndefined(); 100 return toJS(exec, value).isUndefined(); 103 101 } 104 102 … … 112 110 JSLockHolder locker(exec); 113 111 114 JSValue jsValue = toJS(exec, value); 115 return jsValue.isNull(); 112 return toJS(exec, value).isNull(); 116 113 } 117 114 … … 125 122 JSLockHolder locker(exec); 126 123 127 JSValue jsValue = toJS(exec, value); 128 return jsValue.isBoolean(); 124 return toJS(exec, value).isBoolean(); 129 125 } 130 126 … … 138 134 JSLockHolder locker(exec); 139 135 140 JSValue jsValue = toJS(exec, value); 141 return jsValue.isNumber(); 136 return toJS(exec, value).isNumber(); 142 137 } 143 138 … … 151 146 JSLockHolder locker(exec); 152 147 153 JSValue jsValue = toJS(exec, value); 154 return jsValue.isString(); 148 return toJS(exec, value).isString(); 155 149 } 156 150 … … 164 158 JSLockHolder locker(exec); 165 159 166 JSValue jsValue = toJS(exec, value); 167 return jsValue.isObject(); 160 return toJS(exec, value).isObject(); 161 } 162 163 bool JSValueIsArray(JSContextRef ctx, JSValueRef value) 164 { 165 if (!ctx) { 166 ASSERT_NOT_REACHED(); 167 return false; 168 } 169 ExecState* exec = toJS(ctx); 170 JSLockHolder locker(exec); 171 172 return toJS(exec, value).inherits(JSArray::info()); 173 } 174 175 bool JSValueIsDate(JSContextRef ctx, JSValueRef value) 176 { 177 if (!ctx) { 178 ASSERT_NOT_REACHED(); 179 return false; 180 } 181 ExecState* exec = toJS(ctx); 182 JSLockHolder locker(exec); 183 184 return toJS(exec, value).inherits(DateInstance::info()); 168 185 } 169 186
Note:
See TracChangeset
for help on using the changeset viewer.