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

Side by Side Diff: Source/bindings/v8/V8Utilities.h

Issue 114363002: Structured cloning: improve DataCloneError reporting. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased + reset V8TestInterfaceConstructor.cpp result Created 7 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/bindings/v8/SerializedScriptValue.cpp ('k') | Source/bindings/v8/V8Utilities.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) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 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 25 matching lines...) Expand all
36 36
37 namespace WTF { 37 namespace WTF {
38 class ArrayBuffer; 38 class ArrayBuffer;
39 } 39 }
40 40
41 namespace WebCore { 41 namespace WebCore {
42 42
43 class EventListener; 43 class EventListener;
44 class MessagePort; 44 class MessagePort;
45 class ExecutionContext; 45 class ExecutionContext;
46 class ExceptionState;
46 47
47 // Use an array to hold dependents. It works like a ref-counted scheme. A va lue can be added more than once to the DOM object. 48 // Use an array to hold dependents. It works like a ref-counted scheme. A va lue can be added more than once to the DOM object.
48 void createHiddenDependency(v8::Handle<v8::Object>, v8::Local<v8::Value>, in t cacheIndex, v8::Isolate*); 49 void createHiddenDependency(v8::Handle<v8::Object>, v8::Local<v8::Value>, in t cacheIndex, v8::Isolate*);
49 void removeHiddenDependency(v8::Handle<v8::Object>, v8::Local<v8::Value>, in t cacheIndex, v8::Isolate*); 50 void removeHiddenDependency(v8::Handle<v8::Object>, v8::Local<v8::Value>, in t cacheIndex, v8::Isolate*);
50 51
51 // Combo create/remove, for EventHandler setters in generated bindings: 52 // Combo create/remove, for EventHandler setters in generated bindings:
52 void transferHiddenDependency(v8::Handle<v8::Object>, EventListener* oldValu e, v8::Local<v8::Value> newValue, int cacheIndex, v8::Isolate*); 53 void transferHiddenDependency(v8::Handle<v8::Object>, EventListener* oldValu e, v8::Local<v8::Value> newValue, int cacheIndex, v8::Isolate*);
53 54
54 ExecutionContext* getExecutionContext(); 55 ExecutionContext* getExecutionContext();
55 56
56 typedef WTF::Vector<RefPtr<MessagePort>, 1> MessagePortArray; 57 typedef WTF::Vector<RefPtr<MessagePort>, 1> MessagePortArray;
57 typedef WTF::Vector<RefPtr<ArrayBuffer>, 1> ArrayBufferArray; 58 typedef WTF::Vector<RefPtr<ArrayBuffer>, 1> ArrayBufferArray;
58 59
59 // Helper function which pulls the values out of a JS sequence and into a Me ssagePortArray. 60 // Helper function which pulls the values out of a JS sequence and into a Me ssagePortArray.
60 // Also validates the elements per sections 4.1.13 and 4.1.15 of the WebIDL spec and section 8.3.3 61 // Also validates the elements per sections 4.1.13 and 4.1.15 of the WebIDL spec and section 8.3.3
61 // of the HTML5 spec and generates exceptions as appropriate. If the supplie d argument's type isn't 62 // of the HTML5 spec and generates exceptions as appropriate.
62 // a JS sequence, a type error is signalled by setting 'notASequence' to tru e -- the caller
63 // then being responsible for generating a TypeError having a message that f its the context.
64 // Returns true if the array was filled, or false if the passed value was no t of an appropriate type. 63 // Returns true if the array was filled, or false if the passed value was no t of an appropriate type.
65 bool extractTransferables(v8::Local<v8::Value>, MessagePortArray&, ArrayBuff erArray&, bool& notASequence, v8::Isolate*); 64 bool extractTransferables(v8::Local<v8::Value>, int, MessagePortArray&, Arra yBufferArray&, ExceptionState&, v8::Isolate*);
66 65
67 bool getMessagePortArray(v8::Local<v8::Value>, const String& propertyName, M essagePortArray&, v8::Isolate*); 66 bool getMessagePortArray(v8::Local<v8::Value>, const String& propertyName, M essagePortArray&, v8::Isolate*);
68 bool getMessagePortArray(v8::Local<v8::Value>, int argumentIndex, MessagePor tArray&, v8::Isolate*); 67 bool getMessagePortArray(v8::Local<v8::Value>, int argumentIndex, MessagePor tArray&, v8::Isolate*);
69 68
70 } // namespace WebCore 69 } // namespace WebCore
71 70
72 #endif // V8Utilities_h 71 #endif // V8Utilities_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/SerializedScriptValue.cpp ('k') | Source/bindings/v8/V8Utilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698