Title: [133099] trunk/Source/WebKit2
- Revision
- 133099
- Author
- [email protected]
- Date
- 2012-10-31 17:09:54 -0700 (Wed, 31 Oct 2012)
Log Message
CustomFilterOperation parameters list is not decoded correctly in CoordinatedGraphicsArgumentCoders
https://bugs.webkit.org/show_bug.cgi?id=100889
Reviewed by Noam Rosenthal.
The custom filters parameters list was initialized with a specific size and then
the decoder was expected to fill it with all the decoded parameters. The decoder was
using the append command which added the paramters at the end, so it doubled the size
of the vector leaving empty spaces at the beginning of the list. Fixed it by writting
directly into the allocated space.
No new tests, the code path is not activated yet.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(CoreIPC::::decode):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (133098 => 133099)
--- trunk/Source/WebKit2/ChangeLog 2012-11-01 00:06:33 UTC (rev 133098)
+++ trunk/Source/WebKit2/ChangeLog 2012-11-01 00:09:54 UTC (rev 133099)
@@ -1,3 +1,21 @@
+2012-10-31 Alexandru Chiculita <[email protected]>
+
+ CustomFilterOperation parameters list is not decoded correctly in CoordinatedGraphicsArgumentCoders
+ https://bugs.webkit.org/show_bug.cgi?id=100889
+
+ Reviewed by Noam Rosenthal.
+
+ The custom filters parameters list was initialized with a specific size and then
+ the decoder was expected to fill it with all the decoded parameters. The decoder was
+ using the append command which added the paramters at the end, so it doubled the size
+ of the vector leaving empty spaces at the beginning of the list. Fixed it by writting
+ directly into the allocated space.
+
+ No new tests, the code path is not activated yet.
+
+ * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
+ (CoreIPC::::decode):
+
2012-10-31 Sam Weinig <[email protected]>
Convert the rest of the encoders to take the encoder as a reference
Modified: trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp (133098 => 133099)
--- trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp 2012-11-01 00:06:33 UTC (rev 133098)
+++ trunk/Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp 2012-11-01 00:09:54 UTC (rev 133099)
@@ -283,7 +283,6 @@
switch (parameterType) {
case CustomFilterParameter::ARRAY: {
RefPtr<CustomFilterArrayParameter> arrayParameter = CustomFilterArrayParameter::create(name);
- parameters.append(arrayParameter);
uint32_t arrayParameterSize;
if (!decoder->decodeUInt32(arrayParameterSize))
return false;
@@ -293,11 +292,11 @@
return false;
arrayParameter->addValue(arrayParameterValue);
}
+ parameters[i] = arrayParameter.release();
break;
}
case CustomFilterParameter::NUMBER: {
RefPtr<CustomFilterNumberParameter> numberParameter = CustomFilterNumberParameter::create(name);
- parameters.append(numberParameter);
uint32_t numberParameterSize;
if (!decoder->decodeUInt32(numberParameterSize))
return false;
@@ -307,15 +306,16 @@
return false;
numberParameter->addValue(numberParameterValue);
}
+ parameters[i] = numberParameter.release();
break;
}
case CustomFilterParameter::TRANSFORM: {
RefPtr<CustomFilterTransformParameter> transformParameter = CustomFilterTransformParameter::create(name);
- parameters.append(transformParameter);
TransformOperations operations;
if (!ArgumentCoder<TransformOperations>::decode(decoder, operations))
return false;
transformParameter->setOperations(operations);
+ parameters[i] = transformParameter.release();
break;
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes