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

Side by Side Diff: Source/WebCore/bindings/v8/custom/V8MessageEventCustom.cpp

Issue 12926003: Merge 144458 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 9 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
« no previous file with comments | « Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp ('k') | no next file » | 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 { 46 {
47 MessageEvent* event = V8MessageEvent::toNative(info.Holder()); 47 MessageEvent* event = V8MessageEvent::toNative(info.Holder());
48 48
49 v8::Handle<v8::Value> result; 49 v8::Handle<v8::Value> result;
50 switch (event->dataType()) { 50 switch (event->dataType()) {
51 case MessageEvent::DataTypeScriptValue: { 51 case MessageEvent::DataTypeScriptValue: {
52 ScriptValue scriptValue = event->dataAsScriptValue(); 52 ScriptValue scriptValue = event->dataAsScriptValue();
53 if (scriptValue.hasNoValue()) 53 if (scriptValue.hasNoValue())
54 result = v8Null(info.GetIsolate()); 54 result = v8Null(info.GetIsolate());
55 else 55 else
56 result = v8::Local<v8::Value>::New(scriptValue.v8Value()); 56 result = scriptValue.v8Value();
57 break; 57 break;
58 } 58 }
59 59
60 case MessageEvent::DataTypeSerializedScriptValue: 60 case MessageEvent::DataTypeSerializedScriptValue:
61 if (RefPtr<SerializedScriptValue> serializedValue = event->dataAsSeriali zedScriptValue()) 61 if (RefPtr<SerializedScriptValue> serializedValue = event->dataAsSeriali zedScriptValue())
62 result = serializedValue->deserialize(info.GetIsolate(), event->port s()); 62 result = serializedValue->deserialize(info.GetIsolate(), event->port s());
63 else 63 else
64 result = v8Null(info.GetIsolate()); 64 result = v8Null(info.GetIsolate());
65 break; 65 break;
66 66
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 return v8::Undefined(); 131 return v8::Undefined();
132 } 132 }
133 133
134 v8::Handle<v8::Value> V8MessageEvent::webkitInitMessageEventCallback(const v8::A rguments& args) 134 v8::Handle<v8::Value> V8MessageEvent::webkitInitMessageEventCallback(const v8::A rguments& args)
135 { 135 {
136 return initMessageEventCallback(args); 136 return initMessageEventCallback(args);
137 } 137 }
138 138
139 139
140 } // namespace WebCore 140 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698