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

Unified Diff: samples/shell.cc

Issue 345903004: Split out libplatform into a separate libary (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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
« samples/process.cc ('K') | « samples/samples.gyp ('k') | src/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/shell.cc
diff --git a/samples/shell.cc b/samples/shell.cc
index 31063d39a74adabdd572e317ee2ec8a0eb35d460..0f8dc6a8343e2ca181b67020b38578377bc668fd 100644
--- a/samples/shell.cc
+++ b/samples/shell.cc
@@ -25,7 +25,9 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#include <v8.h>
+#include <include/v8.h>
+
+#include <include/libplatform/libplatform.h>
#include <assert.h>
#include <fcntl.h>
@@ -79,6 +81,8 @@ class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
int main(int argc, char* argv[]) {
v8::V8::InitializeICU();
+ v8::Platform* platform = v8::platform::CreateDefaultPlatform(0);
+ v8::V8::InitializePlatform(platform);
v8::V8::SetFlagsFromCommandLine(&argc, argv, true);
ShellArrayBufferAllocator array_buffer_allocator;
v8::V8::SetArrayBufferAllocator(&array_buffer_allocator);
@@ -98,6 +102,8 @@ int main(int argc, char* argv[]) {
if (run_shell) RunShell(context);
}
v8::V8::Dispose();
+ v8::V8::ShutdownPlatform();
+ delete platform;
return result;
}
« samples/process.cc ('K') | « samples/samples.gyp ('k') | src/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698