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

Side by Side Diff: third_party/WebKit/Source/core/events/MessageEvent.cpp

Issue 2785943002: [Bindings] Simplify V8PrivateProperty::Symbol methods (Closed)
Patch Set: work for comments Created 3 years, 8 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 | « third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.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) 2007 Henry Mason (hmason@mac.com) 2 * Copyright (C) 2007 Henry Mason (hmason@mac.com)
3 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2005, 2006, 2007, 2008 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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 262
263 // Ensures a wrapper is created for the data to return now so that V8 knows 263 // Ensures a wrapper is created for the data to return now so that V8 knows
264 // how much memory is used via the wrapper. To keep the wrapper alive, it's 264 // how much memory is used via the wrapper. To keep the wrapper alive, it's
265 // set to the wrapper of the MessageEvent as a private value. 265 // set to the wrapper of the MessageEvent as a private value.
266 switch (getDataType()) { 266 switch (getDataType()) {
267 case MessageEvent::DataTypeScriptValue: 267 case MessageEvent::DataTypeScriptValue:
268 case MessageEvent::DataTypeSerializedScriptValue: 268 case MessageEvent::DataTypeSerializedScriptValue:
269 break; 269 break;
270 case MessageEvent::DataTypeString: 270 case MessageEvent::DataTypeString:
271 V8PrivateProperty::getMessageEventCachedData(isolate).set( 271 V8PrivateProperty::getMessageEventCachedData(isolate).set(
272 isolate->GetCurrentContext(), wrapper, 272 wrapper, v8String(isolate, dataAsString()));
273 v8String(isolate, dataAsString()));
274 break; 273 break;
275 case MessageEvent::DataTypeBlob: 274 case MessageEvent::DataTypeBlob:
276 break; 275 break;
277 case MessageEvent::DataTypeArrayBuffer: 276 case MessageEvent::DataTypeArrayBuffer:
278 V8PrivateProperty::getMessageEventCachedData(isolate).set( 277 V8PrivateProperty::getMessageEventCachedData(isolate).set(
279 isolate->GetCurrentContext(), wrapper, 278 wrapper, ToV8(dataAsArrayBuffer(), wrapper, isolate));
280 ToV8(dataAsArrayBuffer(), wrapper, isolate));
281 break; 279 break;
282 } 280 }
283 281
284 return wrapper; 282 return wrapper;
285 } 283 }
286 284
287 } // namespace blink 285 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698