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

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

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Add metrics and support for non-ASCII text messages to Java endpoints Created 3 years, 11 months 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/SerializedScriptValue.h" 5 #include "bindings/core/v8/SerializedScriptValue.h"
6 6
7 #include "bindings/core/v8/ScriptState.h" 7 #include "bindings/core/v8/ScriptState.h"
8 #include "core/dom/MessagePort.h" 8 #include "core/dom/MessagePort.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/testing/DummyPageHolder.h" 10 #include "core/testing/DummyPageHolder.h"
(...skipping 20 matching lines...) Expand all
31 31
32 enum : uint32_t { 32 enum : uint32_t {
33 kFuzzMessagePorts = 1 << 0, 33 kFuzzMessagePorts = 1 << 0,
34 kFuzzBlobInfo = 1 << 1, 34 kFuzzBlobInfo = 1 << 1,
35 }; 35 };
36 36
37 class WebMessagePortChannelImpl final : public WebMessagePortChannel { 37 class WebMessagePortChannelImpl final : public WebMessagePortChannel {
38 public: 38 public:
39 // WebMessagePortChannel 39 // WebMessagePortChannel
40 void setClient(WebMessagePortChannelClient* client) override {} 40 void setClient(WebMessagePortChannelClient* client) override {}
41 void destroy() override { delete this; }
42 void postMessage(const WebString&, WebMessagePortChannelArray*) { 41 void postMessage(const WebString&, WebMessagePortChannelArray*) {
43 NOTIMPLEMENTED(); 42 NOTIMPLEMENTED();
44 } 43 }
45 bool tryGetMessage(WebString*, WebMessagePortChannelArray&) { return false; } 44 bool tryGetMessage(WebString*, WebMessagePortChannelArray&) { return false; }
46 }; 45 };
47 46
48 } // namespace 47 } // namespace
49 48
50 extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv) { 49 extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv) {
51 InitializeBlinkFuzzTest(argc, argv); 50 InitializeBlinkFuzzTest(argc, argv);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // Clean up. We have to periodically run pending tasks so that scheduled 99 // Clean up. We have to periodically run pending tasks so that scheduled
101 // Oilpan GC occurs. 100 // Oilpan GC occurs.
102 static int iterations = 0; 101 static int iterations = 0;
103 if (iterations++ == 2048) { 102 if (iterations++ == 2048) {
104 testing::runPendingTasks(); 103 testing::runPendingTasks();
105 iterations = 0; 104 iterations = 0;
106 } 105 }
107 106
108 return 0; 107 return 0;
109 } 108 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698