Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: tools/disasm.py

Issue 1411053002: ll_prof: Do not use the deprecated tempfile.mktemp() (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/disasm.py
diff --git a/tools/disasm.py b/tools/disasm.py
index cc7ef0621a31e6519070fe5a3bfc5a887c6cf0eb..f409cb003e808986ef77784bcc91772ec805d578 100644
--- a/tools/disasm.py
+++ b/tools/disasm.py
@@ -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,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698