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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp
index 5a4de649ab706a51bf35f5a4ff70b661c4c87580..6212e7342080c9bc60e65b1c2df1342894ecfbeb 100644
--- a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp
@@ -214,9 +214,10 @@ SerializedScriptValue::transferImageBitmapContents(
for (size_t i = 0; i < imageBitmaps.size(); ++i) {
if (imageBitmaps[i]->isNeutered()) {
- exceptionState.throwDOMException(
- DataCloneError, "ImageBitmap at index " + String::number(i) +
- " is already detached.");
+ exceptionState.throwDOMException(DataCloneError,
+ "ImageBitmap at index " +
+ String::number(i) +
+ " is already detached.");
return nullptr;
}
}
@@ -254,15 +255,17 @@ void SerializedScriptValue::transferOffscreenCanvas(
if (visited.contains(offscreenCanvases[i].get()))
continue;
if (offscreenCanvases[i]->isNeutered()) {
- exceptionState.throwDOMException(
- DataCloneError, "OffscreenCanvas at index " + String::number(i) +
- " is already detached.");
+ exceptionState.throwDOMException(DataCloneError,
+ "OffscreenCanvas at index " +
+ String::number(i) +
+ " is already detached.");
return;
}
if (offscreenCanvases[i]->renderingContext()) {
- exceptionState.throwDOMException(
- DataCloneError, "OffscreenCanvas at index " + String::number(i) +
- " has an associated context.");
+ exceptionState.throwDOMException(DataCloneError,
+ "OffscreenCanvas at index " +
+ String::number(i) +
+ " has an associated context.");
return;
}
visited.insert(offscreenCanvases[i].get());
@@ -334,8 +337,9 @@ bool SerializedScriptValue::extractTransferables(
// Check for duplicate MessagePorts.
if (transferables.messagePorts.contains(port)) {
exceptionState.throwDOMException(
- DataCloneError, "Message port at index " + String::number(i) +
- " is a duplicate of an earlier port.");
+ DataCloneError,
+ "Message port at index " + String::number(i) +
+ " is a duplicate of an earlier port.");
return false;
}
transferables.messagePorts.push_back(port);
@@ -344,8 +348,9 @@ bool SerializedScriptValue::extractTransferables(
v8::Local<v8::Object>::Cast(transferableObject));
if (transferables.arrayBuffers.contains(arrayBuffer)) {
exceptionState.throwDOMException(
- DataCloneError, "ArrayBuffer at index " + String::number(i) +
- " is a duplicate of an earlier ArrayBuffer.");
+ DataCloneError,
+ "ArrayBuffer at index " + String::number(i) +
+ " is a duplicate of an earlier ArrayBuffer.");
return false;
}
transferables.arrayBuffers.push_back(arrayBuffer);
@@ -365,8 +370,9 @@ bool SerializedScriptValue::extractTransferables(
v8::Local<v8::Object>::Cast(transferableObject));
if (transferables.imageBitmaps.contains(imageBitmap)) {
exceptionState.throwDOMException(
- DataCloneError, "ImageBitmap at index " + String::number(i) +
- " is a duplicate of an earlier ImageBitmap.");
+ DataCloneError,
+ "ImageBitmap at index " + String::number(i) +
+ " is a duplicate of an earlier ImageBitmap.");
return false;
}
transferables.imageBitmaps.push_back(imageBitmap);
@@ -402,9 +408,10 @@ SerializedScriptValue::transferArrayBufferContents(
DOMArrayBufferBase* arrayBuffer = *it;
if (arrayBuffer->isNeutered()) {
size_t index = std::distance(arrayBuffers.begin(), it);
- exceptionState.throwDOMException(
- DataCloneError, "ArrayBuffer at index " + String::number(index) +
- " is already neutered.");
+ exceptionState.throwDOMException(DataCloneError,
+ "ArrayBuffer at index " +
+ String::number(index) +
+ " is already neutered.");
return nullptr;
}
}
@@ -443,9 +450,10 @@ SerializedScriptValue::transferArrayBufferContents(
arrayBuffer->buffer()->data(), arrayBuffer->buffer()->byteLength());
}
if (!toTransfer->transfer(contents->at(index))) {
- exceptionState.throwDOMException(
- DataCloneError, "ArrayBuffer at index " + String::number(index) +
- " could not be transferred.");
+ exceptionState.throwDOMException(DataCloneError,
+ "ArrayBuffer at index " +
+ String::number(index) +
+ " could not be transferred.");
return nullptr;
}
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/SerializationTag.h ('k') | third_party/WebKit/Source/bindings/core/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698