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

Unified Diff: src/bootstrapper.h

Issue 911543002: Correctly clean up natives sources on tear down. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | src/bootstrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.h
diff --git a/src/bootstrapper.h b/src/bootstrapper.h
index 9d4f270842d3121a51b6081361019972db45eaf0..4bf74b350bb8d607d04aae6be4197f48d6fc9cd3 100644
--- a/src/bootstrapper.h
+++ b/src/bootstrapper.h
@@ -98,10 +98,6 @@ class Bootstrapper FINAL {
char* RestoreState(char* from);
void FreeThreadResources();
- // This will allocate a char array that is deleted when V8 is shut down.
- // It should only be used for strictly finite allocations.
- char* AllocateAutoDeletedArray(int bytes);
-
// Used for new context creation.
bool InstallExtensions(Handle<Context> native_context,
v8::ExtensionConfiguration* extensions);
@@ -113,10 +109,6 @@ class Bootstrapper FINAL {
typedef int NestingCounterType;
NestingCounterType nesting_;
SourceCodeCache extensions_cache_;
- // This is for delete, not delete[].
- List<char*>* delete_these_non_arrays_on_tear_down_;
- // This is for delete[]
- List<char*>* delete_these_arrays_on_tear_down_;
friend class BootstrapperActive;
friend class Isolate;
@@ -155,9 +147,8 @@ class BootstrapperActive FINAL BASE_EMBEDDED {
class NativesExternalStringResource FINAL
: public v8::String::ExternalOneByteStringResource {
public:
- NativesExternalStringResource(Bootstrapper* bootstrapper,
- const char* source,
- size_t length);
+ NativesExternalStringResource(const char* source, size_t length)
ulan 2015/02/09 08:22:52 Shouldn't the destructor of this delete data?
Yang 2015/02/09 08:37:16 No. The data is supplied either as an address in t
+ : data_(source), length_(length) {}
const char* data() const OVERRIDE { return data_; }
size_t length() const OVERRIDE { return length_; }
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698