Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp

Issue 2493673002: Synchronize OffscreenCanvas content with the placeholder canvas (Closed)
Patch Set: fix obsolete test Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "bindings/core/v8/serialization/V8ScriptValueSerializer.h" 5 #include "bindings/core/v8/serialization/V8ScriptValueSerializer.h"
6 6
7 #include "bindings/core/v8/ToV8.h" 7 #include "bindings/core/v8/ToV8.h"
8 #include "bindings/core/v8/V8Blob.h" 8 #include "bindings/core/v8/V8Blob.h"
9 #include "bindings/core/v8/V8CompositorProxy.h" 9 #include "bindings/core/v8/V8CompositorProxy.h"
10 #include "bindings/core/v8/V8File.h" 10 #include "bindings/core/v8/V8File.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 } 271 }
272 if (canvas->renderingContext()) { 272 if (canvas->renderingContext()) {
273 exceptionState.throwDOMException(DataCloneError, 273 exceptionState.throwDOMException(DataCloneError,
274 "An OffscreenCanvas could not be cloned " 274 "An OffscreenCanvas could not be cloned "
275 "because it had a rendering context."); 275 "because it had a rendering context.");
276 return false; 276 return false;
277 } 277 }
278 writeTag(OffscreenCanvasTransferTag); 278 writeTag(OffscreenCanvasTransferTag);
279 writeUint32(canvas->width()); 279 writeUint32(canvas->width());
280 writeUint32(canvas->height()); 280 writeUint32(canvas->height());
281 writeUint32(canvas->getAssociatedCanvasId()); 281 writeUint32(canvas->placeholderCanvasId());
282 writeUint32(canvas->clientId()); 282 writeUint32(canvas->clientId());
283 writeUint32(canvas->sinkId()); 283 writeUint32(canvas->sinkId());
284 writeUint32(canvas->localId()); 284 writeUint32(canvas->localId());
285 writeUint64(canvas->nonceHigh()); 285 writeUint64(canvas->nonceHigh());
286 writeUint64(canvas->nonceLow()); 286 writeUint64(canvas->nonceLow());
287 return true; 287 return true;
288 } 288 }
289 return false; 289 return false;
290 } 290 }
291 291
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 } 366 }
367 if (!exceptionState.hadException()) { 367 if (!exceptionState.hadException()) {
368 StringView interface = wrappable->wrapperTypeInfo()->interfaceName; 368 StringView interface = wrappable->wrapperTypeInfo()->interfaceName;
369 exceptionState.throwDOMException( 369 exceptionState.throwDOMException(
370 DataCloneError, interface + " object could not be cloned."); 370 DataCloneError, interface + " object could not be cloned.");
371 } 371 }
372 return v8::Nothing<bool>(); 372 return v8::Nothing<bool>();
373 } 373 }
374 374
375 } // namespace blink 375 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698