Changeset 150381 in webkit for trunk/Source/JavaScriptCore/API/JSValueRef.cpp
- Timestamp:
- May 20, 2013, 2:10:19 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSValueRef.cpp
r146494 r150381 65 65 ::JSType JSValueGetType(JSContextRef ctx, JSValueRef value) 66 66 { 67 if (!ctx) { 68 ASSERT_NOT_REACHED(); 69 return kJSTypeUndefined; 70 } 67 71 ExecState* exec = toJS(ctx); 68 72 APIEntryShim entryShim(exec); … … 86 90 bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value) 87 91 { 92 if (!ctx) { 93 ASSERT_NOT_REACHED(); 94 return false; 95 } 88 96 ExecState* exec = toJS(ctx); 89 97 APIEntryShim entryShim(exec); … … 95 103 bool JSValueIsNull(JSContextRef ctx, JSValueRef value) 96 104 { 105 if (!ctx) { 106 ASSERT_NOT_REACHED(); 107 return false; 108 } 97 109 ExecState* exec = toJS(ctx); 98 110 APIEntryShim entryShim(exec); … … 104 116 bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value) 105 117 { 118 if (!ctx) { 119 ASSERT_NOT_REACHED(); 120 return false; 121 } 106 122 ExecState* exec = toJS(ctx); 107 123 APIEntryShim entryShim(exec); … … 113 129 bool JSValueIsNumber(JSContextRef ctx, JSValueRef value) 114 130 { 131 if (!ctx) { 132 ASSERT_NOT_REACHED(); 133 return false; 134 } 115 135 ExecState* exec = toJS(ctx); 116 136 APIEntryShim entryShim(exec); … … 122 142 bool JSValueIsString(JSContextRef ctx, JSValueRef value) 123 143 { 144 if (!ctx) { 145 ASSERT_NOT_REACHED(); 146 return false; 147 } 124 148 ExecState* exec = toJS(ctx); 125 149 APIEntryShim entryShim(exec); … … 131 155 bool JSValueIsObject(JSContextRef ctx, JSValueRef value) 132 156 { 157 if (!ctx) { 158 ASSERT_NOT_REACHED(); 159 return false; 160 } 133 161 ExecState* exec = toJS(ctx); 134 162 APIEntryShim entryShim(exec); … … 140 168 bool JSValueIsObjectOfClass(JSContextRef ctx, JSValueRef value, JSClassRef jsClass) 141 169 { 170 if (!ctx || !jsClass) { 171 ASSERT_NOT_REACHED(); 172 return false; 173 } 142 174 ExecState* exec = toJS(ctx); 143 175 APIEntryShim entryShim(exec); … … 160 192 bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef* exception) 161 193 { 194 if (!ctx) { 195 ASSERT_NOT_REACHED(); 196 return false; 197 } 162 198 ExecState* exec = toJS(ctx); 163 199 APIEntryShim entryShim(exec); … … 177 213 bool JSValueIsStrictEqual(JSContextRef ctx, JSValueRef a, JSValueRef b) 178 214 { 215 if (!ctx) { 216 ASSERT_NOT_REACHED(); 217 return false; 218 } 179 219 ExecState* exec = toJS(ctx); 180 220 APIEntryShim entryShim(exec); … … 188 228 bool JSValueIsInstanceOfConstructor(JSContextRef ctx, JSValueRef value, JSObjectRef constructor, JSValueRef* exception) 189 229 { 230 if (!ctx) { 231 ASSERT_NOT_REACHED(); 232 return false; 233 } 190 234 ExecState* exec = toJS(ctx); 191 235 APIEntryShim entryShim(exec); … … 207 251 JSValueRef JSValueMakeUndefined(JSContextRef ctx) 208 252 { 253 if (!ctx) { 254 ASSERT_NOT_REACHED(); 255 return 0; 256 } 209 257 ExecState* exec = toJS(ctx); 210 258 APIEntryShim entryShim(exec); … … 215 263 JSValueRef JSValueMakeNull(JSContextRef ctx) 216 264 { 265 if (!ctx) { 266 ASSERT_NOT_REACHED(); 267 return 0; 268 } 217 269 ExecState* exec = toJS(ctx); 218 270 APIEntryShim entryShim(exec); … … 223 275 JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool value) 224 276 { 277 if (!ctx) { 278 ASSERT_NOT_REACHED(); 279 return 0; 280 } 225 281 ExecState* exec = toJS(ctx); 226 282 APIEntryShim entryShim(exec); … … 231 287 JSValueRef JSValueMakeNumber(JSContextRef ctx, double value) 232 288 { 289 if (!ctx) { 290 ASSERT_NOT_REACHED(); 291 return 0; 292 } 233 293 ExecState* exec = toJS(ctx); 234 294 APIEntryShim entryShim(exec); … … 245 305 JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string) 246 306 { 307 if (!ctx) { 308 ASSERT_NOT_REACHED(); 309 return 0; 310 } 247 311 ExecState* exec = toJS(ctx); 248 312 APIEntryShim entryShim(exec); … … 253 317 JSValueRef JSValueMakeFromJSONString(JSContextRef ctx, JSStringRef string) 254 318 { 319 if (!ctx) { 320 ASSERT_NOT_REACHED(); 321 return 0; 322 } 255 323 ExecState* exec = toJS(ctx); 256 324 APIEntryShim entryShim(exec); … … 267 335 JSStringRef JSValueCreateJSONString(JSContextRef ctx, JSValueRef apiValue, unsigned indent, JSValueRef* exception) 268 336 { 337 if (!ctx) { 338 ASSERT_NOT_REACHED(); 339 return 0; 340 } 269 341 ExecState* exec = toJS(ctx); 270 342 APIEntryShim entryShim(exec); … … 284 356 bool JSValueToBoolean(JSContextRef ctx, JSValueRef value) 285 357 { 358 if (!ctx) { 359 ASSERT_NOT_REACHED(); 360 return false; 361 } 286 362 ExecState* exec = toJS(ctx); 287 363 APIEntryShim entryShim(exec); … … 293 369 double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception) 294 370 { 371 if (!ctx) { 372 ASSERT_NOT_REACHED(); 373 return QNaN; 374 } 295 375 ExecState* exec = toJS(ctx); 296 376 APIEntryShim entryShim(exec); … … 310 390 JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* exception) 311 391 { 392 if (!ctx) { 393 ASSERT_NOT_REACHED(); 394 return 0; 395 } 312 396 ExecState* exec = toJS(ctx); 313 397 APIEntryShim entryShim(exec); … … 327 411 JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef* exception) 328 412 { 413 if (!ctx) { 414 ASSERT_NOT_REACHED(); 415 return 0; 416 } 329 417 ExecState* exec = toJS(ctx); 330 418 APIEntryShim entryShim(exec); … … 344 432 void JSValueProtect(JSContextRef ctx, JSValueRef value) 345 433 { 434 if (!ctx) { 435 ASSERT_NOT_REACHED(); 436 return; 437 } 346 438 ExecState* exec = toJS(ctx); 347 439 APIEntryShim entryShim(exec);
Note:
See TracChangeset
for help on using the changeset viewer.