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

Side by Side Diff: Source/bindings/v8/SerializedScriptValue.cpp

Issue 18778002: Inherit EventTarget interface instead of duplicating its code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 2353 matching lines...) Expand 10 before | Expand all | Expand 10 after
2364 2364
2365 SerializedScriptValue::SerializedScriptValue() 2365 SerializedScriptValue::SerializedScriptValue()
2366 : m_externallyAllocatedMemory(0) 2366 : m_externallyAllocatedMemory(0)
2367 { 2367 {
2368 } 2368 }
2369 2369
2370 inline void neuterBinding(ArrayBuffer* object) 2370 inline void neuterBinding(ArrayBuffer* object)
2371 { 2371 {
2372 Vector<DOMDataStore*>& allStores = V8PerIsolateData::current()->allStores(); 2372 Vector<DOMDataStore*>& allStores = V8PerIsolateData::current()->allStores();
2373 for (size_t i = 0; i < allStores.size(); i++) { 2373 for (size_t i = 0; i < allStores.size(); i++) {
2374 v8::Handle<v8::Object> wrapper = allStores[i]->get(object); 2374 v8::Handle<v8::Object> wrapper = allStores[i]->get<V8ArrayBuffer>(object );
2375 if (!wrapper.IsEmpty()) { 2375 if (!wrapper.IsEmpty()) {
2376 ASSERT(wrapper->IsArrayBuffer()); 2376 ASSERT(wrapper->IsArrayBuffer());
2377 v8::Handle<v8::ArrayBuffer>::Cast(wrapper)->Neuter(); 2377 v8::Handle<v8::ArrayBuffer>::Cast(wrapper)->Neuter();
2378 } 2378 }
2379 } 2379 }
2380 } 2380 }
2381 2381
2382 inline void neuterBinding(ArrayBufferView* object) 2382 inline void neuterBinding(ArrayBufferView* object)
2383 { 2383 {
2384 Vector<DOMDataStore*>& allStores = V8PerIsolateData::current()->allStores(); 2384 Vector<DOMDataStore*>& allStores = V8PerIsolateData::current()->allStores();
2385 for (size_t i = 0; i < allStores.size(); i++) { 2385 for (size_t i = 0; i < allStores.size(); i++) {
2386 v8::Handle<v8::Object> wrapper = allStores[i]->get(object); 2386 v8::Handle<v8::Object> wrapper = allStores[i]->get<V8ArrayBufferView>(ob ject);
2387 if (!wrapper.IsEmpty()) 2387 if (!wrapper.IsEmpty())
2388 wrapper->SetIndexedPropertiesToExternalArrayData(0, v8::kExternalByt eArray, 0); 2388 wrapper->SetIndexedPropertiesToExternalArrayData(0, v8::kExternalByt eArray, 0);
2389 } 2389 }
2390 } 2390 }
2391 2391
2392 PassOwnPtr<SerializedScriptValue::ArrayBufferContentsArray> SerializedScriptValu e::transferArrayBuffers(ArrayBufferArray& arrayBuffers, bool& didThrow, v8::Isol ate* isolate) 2392 PassOwnPtr<SerializedScriptValue::ArrayBufferContentsArray> SerializedScriptValu e::transferArrayBuffers(ArrayBufferArray& arrayBuffers, bool& didThrow, v8::Isol ate* isolate)
2393 { 2393 {
2394 ASSERT(arrayBuffers.size()); 2394 ASSERT(arrayBuffers.size());
2395 2395
2396 for (size_t i = 0; i < arrayBuffers.size(); i++) { 2396 for (size_t i = 0; i < arrayBuffers.size(); i++) {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
2519 v8::V8::AdjustAmountOfExternalAllocatedMemory(-m_externallyAllocatedMemo ry); 2519 v8::V8::AdjustAmountOfExternalAllocatedMemory(-m_externallyAllocatedMemo ry);
2520 } 2520 }
2521 } 2521 }
2522 2522
2523 uint32_t SerializedScriptValue::wireFormatVersion() 2523 uint32_t SerializedScriptValue::wireFormatVersion()
2524 { 2524 {
2525 return WebCore::wireFormatVersion; 2525 return WebCore::wireFormatVersion;
2526 } 2526 }
2527 2527
2528 } // namespace WebCore 2528 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/DOMDataStore.h ('k') | Source/bindings/v8/V8CustomElementLifecycleCallbacks.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698