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

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

Issue 269543026: [refactor] Use "return false" instead of "return 0". (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | 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) 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 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 m_writer.writeFileListIndex(blobIndices); 1348 m_writer.writeFileListIndex(blobIndices);
1349 else 1349 else
1350 m_writer.writeFileList(*fileList); 1350 m_writer.writeFileList(*fileList);
1351 return 0; 1351 return 0;
1352 } 1352 }
1353 1353
1354 bool writeCryptoKey(v8::Handle<v8::Value> value) 1354 bool writeCryptoKey(v8::Handle<v8::Value> value)
1355 { 1355 {
1356 Key* key = V8Key::toNative(value.As<v8::Object>()); 1356 Key* key = V8Key::toNative(value.As<v8::Object>());
1357 if (!key) 1357 if (!key)
1358 return 0; 1358 return false;
1359 return m_writer.writeCryptoKey(key->key()); 1359 return m_writer.writeCryptoKey(key->key());
1360 } 1360 }
1361 1361
1362 void writeImageData(v8::Handle<v8::Value> value) 1362 void writeImageData(v8::Handle<v8::Value> value)
1363 { 1363 {
1364 ImageData* imageData = V8ImageData::toNative(value.As<v8::Object>()); 1364 ImageData* imageData = V8ImageData::toNative(value.As<v8::Object>());
1365 if (!imageData) 1365 if (!imageData)
1366 return; 1366 return;
1367 Uint8ClampedArray* pixelArray = imageData->data(); 1367 Uint8ClampedArray* pixelArray = imageData->data();
1368 m_writer.writeImageData(imageData->width(), imageData->height(), pixelAr ray->data(), pixelArray->length()); 1368 m_writer.writeImageData(imageData->width(), imageData->height(), pixelAr ray->data(), pixelArray->length());
(...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after
3058 // If the allocated memory was not registered before, then this class is lik ely 3058 // If the allocated memory was not registered before, then this class is lik ely
3059 // used in a context other then Worker's onmessage environment and the prese nce of 3059 // used in a context other then Worker's onmessage environment and the prese nce of
3060 // current v8 context is not guaranteed. Avoid calling v8 then. 3060 // current v8 context is not guaranteed. Avoid calling v8 then.
3061 if (m_externallyAllocatedMemory) { 3061 if (m_externallyAllocatedMemory) {
3062 ASSERT(v8::Isolate::GetCurrent()); 3062 ASSERT(v8::Isolate::GetCurrent());
3063 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(-m_exte rnallyAllocatedMemory); 3063 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(-m_exte rnallyAllocatedMemory);
3064 } 3064 }
3065 } 3065 }
3066 3066
3067 } // namespace WebCore 3067 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698