Changeset 246798 in webkit for trunk/Source/JavaScriptCore/runtime/ConsoleObject.cpp
- Timestamp:
- Jun 25, 2019, 11:36:29 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/ConsoleObject.cpp
r242992 r246798 53 53 static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTakeHeapSnapshot(ExecState*); 54 54 static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTime(ExecState*); 55 static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeLog(ExecState*); 55 56 static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeEnd(ExecState*); 56 57 static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeStamp(ExecState*); … … 93 94 JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("profileEnd", consoleProtoFuncProfileEnd, static_cast<unsigned>(PropertyAttribute::None), 0); 94 95 JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("time", consoleProtoFuncTime, static_cast<unsigned>(PropertyAttribute::None), 0); 96 JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("timeLog", consoleProtoFuncTimeLog, static_cast<unsigned>(PropertyAttribute::None), 0); 95 97 JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("timeEnd", consoleProtoFuncTimeEnd, static_cast<unsigned>(PropertyAttribute::None), 0); 96 98 JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("timeStamp", consoleProtoFuncTimeStamp, static_cast<unsigned>(PropertyAttribute::None), 0); … … 314 316 } 315 317 316 static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTime End(ExecState* exec)318 static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeLog(ExecState* exec) 317 319 { 318 320 VM& vm = exec->vm(); … … 330 332 } 331 333 334 client->timeLog(exec, title, Inspector::createScriptArguments(exec, 1)); 335 return JSValue::encode(jsUndefined()); 336 } 337 338 static EncodedJSValue JSC_HOST_CALL consoleProtoFuncTimeEnd(ExecState* exec) 339 { 340 VM& vm = exec->vm(); 341 auto scope = DECLARE_THROW_SCOPE(vm); 342 ConsoleClient* client = exec->lexicalGlobalObject()->consoleClient(); 343 if (!client) 344 return JSValue::encode(jsUndefined()); 345 346 String title; 347 if (exec->argumentCount() < 1) 348 title = "default"_s; 349 else { 350 title = valueOrDefaultLabelString(exec, exec->argument(0)); 351 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 352 } 353 332 354 client->timeEnd(exec, title); 333 355 return JSValue::encode(jsUndefined());
Note:
See TracChangeset
for help on using the changeset viewer.