| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 } | 487 } |
| 488 | 488 |
| 489 float toFloat(v8::Handle<v8::Value> value, ExceptionState& exceptionState) | 489 float toFloat(v8::Handle<v8::Value> value, ExceptionState& exceptionState) |
| 490 { | 490 { |
| 491 TONATIVE_DEFAULT_EXCEPTIONSTATE(v8::Local<v8::Number>, numberObject, value->
ToNumber(), exceptionState, 0); | 491 TONATIVE_DEFAULT_EXCEPTIONSTATE(v8::Local<v8::Number>, numberObject, value->
ToNumber(), exceptionState, 0); |
| 492 return numberObject->NumberValue(); | 492 return numberObject->NumberValue(); |
| 493 } | 493 } |
| 494 | 494 |
| 495 String toByteString(v8::Handle<v8::Value> value, ExceptionState& exceptionState) | 495 String toByteString(v8::Handle<v8::Value> value, ExceptionState& exceptionState) |
| 496 { | 496 { |
| 497 // Handle [Default=NullString] | 497 // Handle null default value. |
| 498 if (value.IsEmpty()) | 498 if (value.IsEmpty()) |
| 499 return String(); | 499 return String(); |
| 500 | 500 |
| 501 // From the Web IDL spec: http://heycam.github.io/webidl/#es-ByteString | 501 // From the Web IDL spec: http://heycam.github.io/webidl/#es-ByteString |
| 502 | 502 |
| 503 // 1. Let x be ToString(v) | 503 // 1. Let x be ToString(v) |
| 504 TONATIVE_DEFAULT_EXCEPTIONSTATE(v8::Local<v8::String>, stringObject, value->
ToString(), exceptionState, String()); | 504 TONATIVE_DEFAULT_EXCEPTIONSTATE(v8::Local<v8::String>, stringObject, value->
ToString(), exceptionState, String()); |
| 505 String x = toCoreString(stringObject); | 505 String x = toCoreString(stringObject); |
| 506 | 506 |
| 507 // 2. If the value of any element of x is greater than 255, then throw a Typ
eError. | 507 // 2. If the value of any element of x is greater than 255, then throw a Typ
eError. |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(Executio
nContext* context, v8::Handle<v8::Function> function, v8::Isolate* isolate) | 810 PassRefPtr<TraceEvent::ConvertableToTraceFormat> devToolsTraceEventData(Executio
nContext* context, v8::Handle<v8::Function> function, v8::Isolate* isolate) |
| 811 { | 811 { |
| 812 int scriptId = 0; | 812 int scriptId = 0; |
| 813 String resourceName; | 813 String resourceName; |
| 814 int lineNumber = 1; | 814 int lineNumber = 1; |
| 815 GetDevToolsFunctionInfo(function, isolate, scriptId, resourceName, lineNumbe
r); | 815 GetDevToolsFunctionInfo(function, isolate, scriptId, resourceName, lineNumbe
r); |
| 816 return InspectorFunctionCallEvent::data(context, scriptId, resourceName, lin
eNumber); | 816 return InspectorFunctionCallEvent::data(context, scriptId, resourceName, lin
eNumber); |
| 817 } | 817 } |
| 818 | 818 |
| 819 } // namespace WebCore | 819 } // namespace WebCore |
| OLD | NEW |