Commit b47bf130 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[cleanup] Remove unused monkey patches

A.p.includes can now replace monkey-patched A.p.contains.

Bug: v8:7310, v8:7327
Change-Id: Ibbd6c5526322599c06f5485471cf6a6361b082b9
Reviewed-on: https://chromium-review.googlesource.com/934265
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51521}
parent 19068040
......@@ -2,25 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
Array.prototype.getStaggeredFromMiddle = function(i) {
if (i >= this.length) {
throw("getStaggeredFromMiddle: OOB");
}
var middle = Math.floor(this.length / 2);
var index = middle + (((i % 2) == 0) ? (i / 2) : (((1 - i) / 2) - 1));
return this[index];
}
Array.prototype.contains = function(obj) {
var i = this.length;
while (i--) {
if (this[i] === obj) {
return true;
}
}
return false;
}
Math.alignUp = function(raw, multiple) {
return Math.floor((raw + multiple - 1) / multiple) * multiple;
}
......@@ -65,18 +65,15 @@ class Snapper {
}
setDisassemblyExpanded(newState) {
console.log(newState)
if (this.disassemblyExpand.classed("invisible") === newState) return;
this.disassemblyExpandUpdate(newState);
let resizer = this.resizer;
if (newState) {
resizer.sep_right = resizer.sep_right_snap;
resizer.sep_right_snap = resizer.client_width;
console.log("set expand")
} else {
resizer.sep_right_snap = resizer.sep_right;
resizer.sep_right = resizer.client_width;
console.log("set collapse")
}
resizer.updatePanes();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment