| Index: third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
|
| diff --git a/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
|
| index 25cd3d316f7e5ea559f2fb5bfefc55b9134fd17d..3cf74820dc296ec8c453d26389f516425852fb02 100644
|
| --- a/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
|
| @@ -350,15 +350,7 @@ void InspectorLayerTreeAgent::loadSnapshot(ErrorString* errorString, PassOwnPtr<
|
| Vector<RefPtr<PictureSnapshot::TilePictureStream>> decodedTiles;
|
| decodedTiles.grow(tiles->length());
|
| for (size_t i = 0; i < tiles->length(); ++i) {
|
| - OwnPtr<protocol::LayerTree::PictureTile> tile = tiles->get(i);
|
| - if (!tile) {
|
| - *errorString = "Invalid argument, array item is not an object";
|
| - return;
|
| - }
|
| - if (!tile->hasX() || !tile->hasY() || !tile->hasPicture()) {
|
| - *errorString = "Invalid argument, missing required field";
|
| - return;
|
| - }
|
| + protocol::LayerTree::PictureTile* tile = tiles->get(i);
|
| decodedTiles[i] = adoptRef(new PictureSnapshot::TilePictureStream());
|
| decodedTiles[i]->layerOffset.set(tile->getX(), tile->getY());
|
| if (!base64Decode(tile->getPicture(), decodedTiles[i]->data)) {
|
| @@ -420,8 +412,6 @@ void InspectorLayerTreeAgent::replaySnapshot(ErrorString* errorString, const Str
|
|
|
| static bool parseRect(protocol::DOM::Rect* object, FloatRect* rect)
|
| {
|
| - if (!object->hasX() || !object->hasY() || !object->hasWidth() || !object->hasHeight())
|
| - return false;
|
| *rect = FloatRect(object->getX(), object->getY(), object->getWidth(), object->getHeight());
|
| return true;
|
| }
|
| @@ -452,7 +442,8 @@ void InspectorLayerTreeAgent::snapshotCommandLog(ErrorString* errorString, const
|
| const PictureSnapshot* snapshot = snapshotById(errorString, snapshotId);
|
| if (!snapshot)
|
| return;
|
| - *commandLog = Array<RefPtr<JSONObject>>::runtimeCast(snapshot->snapshotCommandLog());
|
| + protocol::ErrorSupport errors(errorString);
|
| + *commandLog = Array<RefPtr<JSONObject>>::parse(snapshot->snapshotCommandLog(), &errors);
|
| }
|
|
|
| void InspectorLayerTreeAgent::willAddPageOverlay(const GraphicsLayer* layer)
|
|
|