| 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 29 matching lines...) Expand all Loading... |
| 40 WebSerializedScriptValue WebSerializedScriptValue::fromString( | 40 WebSerializedScriptValue WebSerializedScriptValue::fromString( |
| 41 const WebString& s) { | 41 const WebString& s) { |
| 42 return SerializedScriptValue::create(s); | 42 return SerializedScriptValue::create(s); |
| 43 } | 43 } |
| 44 | 44 |
| 45 WebSerializedScriptValue WebSerializedScriptValue::serialize( | 45 WebSerializedScriptValue WebSerializedScriptValue::serialize( |
| 46 v8::Isolate* isolate, | 46 v8::Isolate* isolate, |
| 47 v8::Local<v8::Value> value) { | 47 v8::Local<v8::Value> value) { |
| 48 DummyExceptionStateForTesting exceptionState; | 48 DummyExceptionStateForTesting exceptionState; |
| 49 WebSerializedScriptValue serializedValue = SerializedScriptValue::serialize( | 49 WebSerializedScriptValue serializedValue = SerializedScriptValue::serialize( |
| 50 isolate, value, nullptr, nullptr, exceptionState); | 50 isolate, value, SerializedScriptValue::SerializeOptions(), |
| 51 exceptionState); |
| 51 if (exceptionState.hadException()) | 52 if (exceptionState.hadException()) |
| 52 return createInvalid(); | 53 return createInvalid(); |
| 53 return serializedValue; | 54 return serializedValue; |
| 54 } | 55 } |
| 55 | 56 |
| 56 WebSerializedScriptValue WebSerializedScriptValue::createInvalid() { | 57 WebSerializedScriptValue WebSerializedScriptValue::createInvalid() { |
| 57 return SerializedScriptValue::create(); | 58 return SerializedScriptValue::create(); |
| 58 } | 59 } |
| 59 | 60 |
| 60 void WebSerializedScriptValue::reset() { | 61 void WebSerializedScriptValue::reset() { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 82 PassRefPtr<SerializedScriptValue> value) { | 83 PassRefPtr<SerializedScriptValue> value) { |
| 83 m_private = value; | 84 m_private = value; |
| 84 return *this; | 85 return *this; |
| 85 } | 86 } |
| 86 | 87 |
| 87 WebSerializedScriptValue::operator PassRefPtr<SerializedScriptValue>() const { | 88 WebSerializedScriptValue::operator PassRefPtr<SerializedScriptValue>() const { |
| 88 return m_private.get(); | 89 return m_private.get(); |
| 89 } | 90 } |
| 90 | 91 |
| 91 } // namespace blink | 92 } // namespace blink |
| OLD | NEW |