зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1416066 - Update script_cache.py to support new version of startup script cache file. r=kmag
MozReview-Commit-ID: IuNZ3kjLcak --HG-- extra : rebase_source : ef9dcd24f9311956bcae303336b874f6cc358905
This commit is contained in:
Родитель
6cb83fd0dd
Коммит
62198551fb
|
@ -4,7 +4,7 @@ import os
|
|||
import struct
|
||||
import sys
|
||||
|
||||
MAGIC = b'mozXDRcachev001\0'
|
||||
MAGIC = b'mozXDRcachev002\0'
|
||||
|
||||
|
||||
def usage():
|
||||
|
@ -17,17 +17,20 @@ def usage():
|
|||
|
||||
|
||||
class ProcessTypes:
|
||||
Default = 0
|
||||
Web = 1
|
||||
Extension = 2
|
||||
Privileged = 3
|
||||
Uninitialized = 0
|
||||
Parent = 1
|
||||
Web = 2
|
||||
Extension = 3
|
||||
Privileged = 4
|
||||
|
||||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def __str__(self):
|
||||
res = []
|
||||
if self.val & (1 << self.Default):
|
||||
if self.val & (1 << self.Uninitialized):
|
||||
raise Exception('Uninitialized process type')
|
||||
if self.val & (1 << self.Parent):
|
||||
res.append('Parent')
|
||||
if self.val & (1 << self.Web):
|
||||
res.append('Web')
|
||||
|
|
Загрузка…
Ссылка в новой задаче