ll_prof: Do not use the deprecated tempfile.mktemp()

BUG=v8:1306
LOG=Y

Review URL: https://codereview.chromium.org/1411053002

Cr-Commit-Position: refs/heads/master@{#31382}
This commit is contained in:
aperez 2015-10-19 09:08:14 -07:00 committed by Commit bot
parent b065411f81
commit 66b0fbee2a

View File

@ -60,7 +60,9 @@ def GetDisasmLines(filename, offset, size, arch, inplace, arch_flags=""):
# Create a temporary file containing a copy of the code.
assert arch in _ARCH_MAP, "Unsupported architecture '%s'" % arch
arch_flags = arch_flags + " " + _ARCH_MAP[arch]
tmp_name = tempfile.mktemp(".v8code")
tmp_file = tempfile.NamedTemporaryFile(prefix=".v8code", delete=False)
tmp_name = tmp_file.name
tmp_file.close()
command = "dd if=%s of=%s bs=1 count=%d skip=%d && " \
"%s %s -D -b binary %s %s" % (
filename, tmp_name, size, offset,