[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: VisualDiff: Remove redundant length check

2017-01-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/334190 )

Change subject: VisualDiff: Remove redundant length check
..


VisualDiff: Remove redundant length check

If the node lengths are the same (which we check a few lines above)
then the linear data lengths must be too.

(PS I cheated and discovered this using the code coverage report)

Change-Id: If8f37f6e19a572ffd780680cdb66d2707e7c15b4
---
M src/dm/ve.dm.VisualDiff.js
1 file changed, 0 insertions(+), 3 deletions(-)

Approvals:
  Tchanders: Looks good to me, approved
  jenkins-bot: Verified
  Jforrester: Looks good to me, but someone else must approve



diff --git a/src/dm/ve.dm.VisualDiff.js b/src/dm/ve.dm.VisualDiff.js
index 48ac90a..8621dbd 100644
--- a/src/dm/ve.dm.VisualDiff.js
+++ b/src/dm/ve.dm.VisualDiff.js
@@ -123,9 +123,6 @@
oldData = this.oldDoc.getData( oldDocChild.getOuterRange() );
newData = this.newDoc.getData( newDocChild.getOuterRange() );
 
-   if ( oldData.length !== newData.length ) {
-   return false;
-   }
if ( JSON.stringify( oldData ) === JSON.stringify( newData ) ) {
return true;
}

-- 
To view, visit https://gerrit.wikimedia.org/r/334190
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If8f37f6e19a572ffd780680cdb66d2707e7c15b4
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Tchanders 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: VisualDiff: Remove redundant length check

2017-01-25 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/334190 )

Change subject: VisualDiff: Remove redundant length check
..

VisualDiff: Remove redundant length check

If the node lengths are the same (which we check a few lines above)
then the linear data lengths must be too.

(PS I cheated and discovered this using the code coverage report)

Change-Id: If8f37f6e19a572ffd780680cdb66d2707e7c15b4
---
M src/dm/ve.dm.VisualDiff.js
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/90/334190/1

diff --git a/src/dm/ve.dm.VisualDiff.js b/src/dm/ve.dm.VisualDiff.js
index 48ac90a..8621dbd 100644
--- a/src/dm/ve.dm.VisualDiff.js
+++ b/src/dm/ve.dm.VisualDiff.js
@@ -123,9 +123,6 @@
oldData = this.oldDoc.getData( oldDocChild.getOuterRange() );
newData = this.newDoc.getData( newDocChild.getOuterRange() );
 
-   if ( oldData.length !== newData.length ) {
-   return false;
-   }
if ( JSON.stringify( oldData ) === JSON.stringify( newData ) ) {
return true;
}

-- 
To view, visit https://gerrit.wikimedia.org/r/334190
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8f37f6e19a572ffd780680cdb66d2707e7c15b4
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits