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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 718383003: bindings: fixed incorrect dependency of SerializedScriptValue. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added fast/js/structured-clone.html Created 6 years 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
« no previous file with comments | « Source/core/page/EventSource.cpp ('k') | Source/modules/indexeddb/IDBObjectStore.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 15 matching lines...) Expand all
26 26
27 #include "config.h" 27 #include "config.h"
28 #include "core/testing/Internals.h" 28 #include "core/testing/Internals.h"
29 29
30 #include "bindings/core/v8/ExceptionMessages.h" 30 #include "bindings/core/v8/ExceptionMessages.h"
31 #include "bindings/core/v8/ExceptionState.h" 31 #include "bindings/core/v8/ExceptionState.h"
32 #include "bindings/core/v8/ScriptFunction.h" 32 #include "bindings/core/v8/ScriptFunction.h"
33 #include "bindings/core/v8/ScriptPromise.h" 33 #include "bindings/core/v8/ScriptPromise.h"
34 #include "bindings/core/v8/ScriptPromiseResolver.h" 34 #include "bindings/core/v8/ScriptPromiseResolver.h"
35 #include "bindings/core/v8/SerializedScriptValue.h" 35 #include "bindings/core/v8/SerializedScriptValue.h"
36 #include "bindings/core/v8/SerializedScriptValueFactory.h"
36 #include "bindings/core/v8/V8ThrowException.h" 37 #include "bindings/core/v8/V8ThrowException.h"
37 #include "core/InternalRuntimeFlags.h" 38 #include "core/InternalRuntimeFlags.h"
38 #include "core/animation/AnimationTimeline.h" 39 #include "core/animation/AnimationTimeline.h"
39 #include "core/css/StyleSheetContents.h" 40 #include "core/css/StyleSheetContents.h"
40 #include "core/css/resolver/StyleResolver.h" 41 #include "core/css/resolver/StyleResolver.h"
41 #include "core/css/resolver/StyleResolverStats.h" 42 #include "core/css/resolver/StyleResolverStats.h"
42 #include "core/css/resolver/ViewportStyleResolver.h" 43 #include "core/css/resolver/ViewportStyleResolver.h"
43 #include "core/dom/ClientRect.h" 44 #include "core/dom/ClientRect.h"
44 #include "core/dom/ClientRectList.h" 45 #include "core/dom/ClientRectList.h"
45 #include "core/dom/DOMArrayBuffer.h" 46 #include "core/dom/DOMArrayBuffer.h"
(...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after
1990 { 1991 {
1991 String stringValue = value->toWireString(); 1992 String stringValue = value->toWireString();
1992 RefPtr<DOMArrayBuffer> buffer = DOMArrayBuffer::createUninitialized(stringVa lue.length(), sizeof(UChar)); 1993 RefPtr<DOMArrayBuffer> buffer = DOMArrayBuffer::createUninitialized(stringVa lue.length(), sizeof(UChar));
1993 stringValue.copyTo(static_cast<UChar*>(buffer->data()), 0, stringValue.lengt h()); 1994 stringValue.copyTo(static_cast<UChar*>(buffer->data()), 0, stringValue.lengt h());
1994 return buffer.release(); 1995 return buffer.release();
1995 } 1996 }
1996 1997
1997 PassRefPtr<SerializedScriptValue> Internals::deserializeBuffer(PassRefPtr<DOMArr ayBuffer> buffer) const 1998 PassRefPtr<SerializedScriptValue> Internals::deserializeBuffer(PassRefPtr<DOMArr ayBuffer> buffer) const
1998 { 1999 {
1999 String value(static_cast<const UChar*>(buffer->data()), buffer->byteLength() / sizeof(UChar)); 2000 String value(static_cast<const UChar*>(buffer->data()), buffer->byteLength() / sizeof(UChar));
2000 return SerializedScriptValue::createFromWire(value); 2001 return SerializedScriptValueFactory::instance().createFromWire(value);
2001 } 2002 }
2002 2003
2003 void Internals::forceReload(bool endToEnd) 2004 void Internals::forceReload(bool endToEnd)
2004 { 2005 {
2005 frame()->loader().reload(endToEnd ? EndToEndReload : NormalReload); 2006 frame()->loader().reload(endToEnd ? EndToEndReload : NormalReload);
2006 } 2007 }
2007 2008
2008 PassRefPtrWillBeRawPtr<ClientRect> Internals::selectionBounds(ExceptionState& ex ceptionState) 2009 PassRefPtrWillBeRawPtr<ClientRect> Internals::selectionBounds(ExceptionState& ex ceptionState)
2009 { 2010 {
2010 Document* document = contextDocument(); 2011 Document* document = contextDocument();
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
2349 } 2350 }
2350 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr eate(element->document(), options)); 2351 toHTMLPlugInElement(element)->setPlaceholder(DictionaryPluginPlaceholder::cr eate(element->document(), options));
2351 } 2352 }
2352 2353
2353 Iterator* Internals::iterator(ScriptState* scriptState, ExceptionState& exceptio nState) 2354 Iterator* Internals::iterator(ScriptState* scriptState, ExceptionState& exceptio nState)
2354 { 2355 {
2355 return new InternalsIterator; 2356 return new InternalsIterator;
2356 } 2357 }
2357 2358
2358 } // namespace blink 2359 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/EventSource.cpp ('k') | Source/modules/indexeddb/IDBObjectStore.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698