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

Side by Side Diff: Source/bindings/core/v8/WorkerScriptController.h

Issue 422293004: Update memory related v8 notifications API calls (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/core/v8/V8GCForContextDispose.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 v8::Isolate* isolate() const { return m_isolate; } 78 v8::Isolate* isolate() const { return m_isolate; }
79 DOMWrapperWorld& world() const { return *m_world; } 79 DOMWrapperWorld& world() const { return *m_world; }
80 ScriptState* scriptState() { return m_scriptState.get(); } 80 ScriptState* scriptState() { return m_scriptState.get(); }
81 v8::Local<v8::Context> context() { return m_scriptState ? m_scriptState->con text() : v8::Local<v8::Context>(); } 81 v8::Local<v8::Context> context() { return m_scriptState ? m_scriptState->con text() : v8::Local<v8::Context>(); }
82 bool isContextInitialized() { return m_scriptState && !!m_scriptState->perCo ntextData(); } 82 bool isContextInitialized() { return m_scriptState && !!m_scriptState->perCo ntextData(); }
83 83
84 // Send a notification about current thread is going to be idle. 84 // Send a notification about current thread is going to be idle.
85 // Returns true if the embedder should stop calling idleNotification 85 // Returns true if the embedder should stop calling idleNotification
86 // until real work has been done. 86 // until real work has been done.
87 bool idleNotification() { return v8::V8::IdleNotification(); } 87 bool idleNotification() { return m_isolate->IdleNotification(1000); }
88 88
89 private: 89 private:
90 class WorkerGlobalScopeExecutionState; 90 class WorkerGlobalScopeExecutionState;
91 91
92 // Evaluate a script file in the current execution environment. 92 // Evaluate a script file in the current execution environment.
93 ScriptValue evaluate(const String& script, const String& fileName, const Tex tPosition& scriptStartPosition); 93 ScriptValue evaluate(const String& script, const String& fileName, const Tex tPosition& scriptStartPosition);
94 94
95 v8::Isolate* m_isolate; 95 v8::Isolate* m_isolate;
96 WorkerGlobalScope& m_workerGlobalScope; 96 WorkerGlobalScope& m_workerGlobalScope;
97 RefPtr<ScriptState> m_scriptState; 97 RefPtr<ScriptState> m_scriptState;
(...skipping 10 matching lines...) Expand all
108 // Oilpan enabled; stack scanning will visit the object and 108 // Oilpan enabled; stack scanning will visit the object and
109 // trace its on-heap fields. 109 // trace its on-heap fields.
110 GC_PLUGIN_IGNORE("394615") 110 GC_PLUGIN_IGNORE("394615")
111 WorkerGlobalScopeExecutionState* m_globalScopeExecutionState; 111 WorkerGlobalScopeExecutionState* m_globalScopeExecutionState;
112 OwnPtr<V8IsolateInterruptor> m_interruptor; 112 OwnPtr<V8IsolateInterruptor> m_interruptor;
113 }; 113 };
114 114
115 } // namespace blink 115 } // namespace blink
116 116
117 #endif // WorkerScriptController_h 117 #endif // WorkerScriptController_h
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8GCForContextDispose.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698