Bug 1283763 - Fix gdb pretty printers for nsTArray. r=tbsaunde

MozReview-Commit-ID: 6ZirDggUeyD

--HG--
extra : transplant_source : %EA%BF%05i%FC%20%BB%0Dq%AC%E7%A7%E9%F7%D0%F4%C3%82O%F6
This commit is contained in:
Wei-Cheng Pan 2016-07-01 14:58:49 +08:00
parent d89f7681bc
commit 4d9de45f4d
2 changed files with 7 additions and 4 deletions

View File

@ -24,9 +24,9 @@ class weak_ptr_printer(object):
return '[(%s) %s]' % (weak_ptr.dynamic_type, weak_ptr)
@GeckoPrettyPrinter('nsAutoPtr', 'nsAutoPtr<.*>')
@GeckoPrettyPrinter('nsCOMPtr', 'nsCOMPtr<.*>')
@GeckoPrettyPrinter('RefPtr', 'RefPtr<.*>')
@GeckoPrettyPrinter('nsAutoPtr', '^nsAutoPtr<.*>$')
@GeckoPrettyPrinter('nsCOMPtr', '^nsCOMPtr<.*>$')
@GeckoPrettyPrinter('RefPtr', '^RefPtr<.*>$')
class smartptr_printer(object):
def __init__(self, value):
self.value = value['mRawPtr']

View File

@ -8,7 +8,10 @@ import gdb
import itertools
from gdbpp import GeckoPrettyPrinter
@GeckoPrettyPrinter('TArray', '.*TArray<.*>$')
@GeckoPrettyPrinter('InfallibleTArray', '^InfallibleTArray<.*>$')
@GeckoPrettyPrinter('FallibleTArray', '^FallibleTArray<.*>$')
@GeckoPrettyPrinter('AutoTArray', '^AutoTArray<.*>$')
@GeckoPrettyPrinter('nsTArray', '^nsTArray<.*>$')
class tarray_printer(object):
def __init__(self, value):
self.value = value