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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 PassRefPtr<SerializedScriptValue> | 76 PassRefPtr<SerializedScriptValue> |
77 SerializedScriptValue::SerializeAndSwallowExceptions( | 77 SerializedScriptValue::SerializeAndSwallowExceptions( |
78 v8::Isolate* isolate, | 78 v8::Isolate* isolate, |
79 v8::Local<v8::Value> value) { | 79 v8::Local<v8::Value> value) { |
80 DummyExceptionStateForTesting exception_state; | 80 DummyExceptionStateForTesting exception_state; |
81 RefPtr<SerializedScriptValue> serialized = | 81 RefPtr<SerializedScriptValue> serialized = |
82 Serialize(isolate, value, SerializeOptions(), exception_state); | 82 Serialize(isolate, value, SerializeOptions(), exception_state); |
83 if (exception_state.HadException()) | 83 if (exception_state.HadException()) |
84 return NullValue(); | 84 return NullValue(); |
85 return serialized.Release(); | 85 return serialized; |
86 } | 86 } |
87 | 87 |
88 PassRefPtr<SerializedScriptValue> SerializedScriptValue::Create() { | 88 PassRefPtr<SerializedScriptValue> SerializedScriptValue::Create() { |
89 return AdoptRef(new SerializedScriptValue); | 89 return AdoptRef(new SerializedScriptValue); |
90 } | 90 } |
91 | 91 |
92 PassRefPtr<SerializedScriptValue> SerializedScriptValue::Create( | 92 PassRefPtr<SerializedScriptValue> SerializedScriptValue::Create( |
93 const String& data) { | 93 const String& data) { |
94 return AdoptRef(new SerializedScriptValue(data)); | 94 return AdoptRef(new SerializedScriptValue(data)); |
95 } | 95 } |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 std::transform(image_bitmap_contents_array_.begin(), | 571 std::transform(image_bitmap_contents_array_.begin(), |
572 image_bitmap_contents_array_.end(), | 572 image_bitmap_contents_array_.end(), |
573 received_->image_bitmaps.begin(), | 573 received_->image_bitmaps.begin(), |
574 [](RefPtr<StaticBitmapImage>& contents) { | 574 [](RefPtr<StaticBitmapImage>& contents) { |
575 return ImageBitmap::Create(std::move(contents)); | 575 return ImageBitmap::Create(std::move(contents)); |
576 }); | 576 }); |
577 image_bitmap_contents_array_.clear(); | 577 image_bitmap_contents_array_.clear(); |
578 } | 578 } |
579 | 579 |
580 } // namespace blink | 580 } // namespace blink |
OLD | NEW |