OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 Google Inc. All rights reserved. | 2 * Copyright (c) 2010 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 if (value->IsNumberObject()) { | 84 if (value->IsNumberObject()) { |
85 m_builder.appendNumber(v8::Handle<v8::NumberObject>::Cast(value)->Va
lueOf()); | 85 m_builder.appendNumber(v8::Handle<v8::NumberObject>::Cast(value)->Va
lueOf()); |
86 return true; | 86 return true; |
87 } | 87 } |
88 if (value->IsBooleanObject()) { | 88 if (value->IsBooleanObject()) { |
89 m_builder.append(v8::Handle<v8::BooleanObject>::Cast(value)->ValueOf
() ? "true" : "false"); | 89 m_builder.append(v8::Handle<v8::BooleanObject>::Cast(value)->ValueOf
() ? "true" : "false"); |
90 return true; | 90 return true; |
91 } | 91 } |
92 if (value->IsArray()) | 92 if (value->IsArray()) |
93 return append(v8::Handle<v8::Array>::Cast(value)); | 93 return append(v8::Handle<v8::Array>::Cast(value)); |
94 if (toDOMWindow(value, m_isolate)) { | 94 if (toDOMWindow(m_isolate, value)) { |
95 m_builder.append("[object Window]"); | 95 m_builder.append("[object Window]"); |
96 return true; | 96 return true; |
97 } | 97 } |
98 if (value->IsObject() | 98 if (value->IsObject() |
99 && !value->IsDate() | 99 && !value->IsDate() |
100 && !value->IsFunction() | 100 && !value->IsFunction() |
101 && !value->IsNativeError() | 101 && !value->IsNativeError() |
102 && !value->IsRegExp()) | 102 && !value->IsRegExp()) |
103 return append(v8::Handle<v8::Object>::Cast(value)->ObjectProtoToStri
ng()); | 103 return append(v8::Handle<v8::Object>::Cast(value)->ObjectProtoToStri
ng()); |
104 return append(value->ToString()); | 104 return append(value->ToString()); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 if (!argumentCount()) | 186 if (!argumentCount()) |
187 return false; | 187 return false; |
188 | 188 |
189 const ScriptValue& value = argumentAt(0); | 189 const ScriptValue& value = argumentAt(0); |
190 ScriptState::Scope scope(m_scriptState.get()); | 190 ScriptState::Scope scope(m_scriptState.get()); |
191 result = V8ValueStringBuilder::toString(value.v8Value(), value.isolate()); | 191 result = V8ValueStringBuilder::toString(value.v8Value(), value.isolate()); |
192 return true; | 192 return true; |
193 } | 193 } |
194 | 194 |
195 } // namespace blink | 195 } // namespace blink |
OLD | NEW |