Handle RegExp correctly in devtools

Issue #77
This commit is contained in:
janekptacijarabaci 2018-03-19 10:47:16 +01:00 committed by Roy Tam
commit 6e997648ba

View file

@ -1158,11 +1158,6 @@ DebuggerServer.ObjectActorPreviewers = {
}],
RegExp: [function ({obj, hooks}, grip) {
// Avoid having any special preview for the RegExp.prototype itself.
if (!obj.proto || obj.proto.class != "RegExp") {
return false;
}
let str = RegExp.prototype.toString.call(obj.unsafeDereference());
grip.displayString = hooks.createValueGrip(str);
return true;