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

Side by Side Diff: samples/process.cc

Issue 23707009: Deprecate Persistent functions which were marked to be deprecated. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code review (svenpanne) Created 7 years, 3 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 | « include/v8.h ('k') | src/d8.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 } else { 284 } else {
285 return true; 285 return true;
286 } 286 }
287 } 287 }
288 288
289 289
290 JsHttpRequestProcessor::~JsHttpRequestProcessor() { 290 JsHttpRequestProcessor::~JsHttpRequestProcessor() {
291 // Dispose the persistent handles. When noone else has any 291 // Dispose the persistent handles. When noone else has any
292 // references to the objects stored in the handles they will be 292 // references to the objects stored in the handles they will be
293 // automatically reclaimed. 293 // automatically reclaimed.
294 Isolate* isolate = GetIsolate(); 294 context_.Dispose();
295 context_.Dispose(isolate); 295 process_.Dispose();
296 process_.Dispose(isolate);
297 } 296 }
298 297
299 298
300 Persistent<ObjectTemplate> JsHttpRequestProcessor::request_template_; 299 Persistent<ObjectTemplate> JsHttpRequestProcessor::request_template_;
301 Persistent<ObjectTemplate> JsHttpRequestProcessor::map_template_; 300 Persistent<ObjectTemplate> JsHttpRequestProcessor::map_template_;
302 301
303 302
304 // ----------------------------------- 303 // -----------------------------------
305 // --- A c c e s s i n g M a p s --- 304 // --- A c c e s s i n g M a p s ---
306 // ----------------------------------- 305 // -----------------------------------
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 JsHttpRequestProcessor processor(isolate, source); 644 JsHttpRequestProcessor processor(isolate, source);
646 map<string, string> output; 645 map<string, string> output;
647 if (!processor.Initialize(&options, &output)) { 646 if (!processor.Initialize(&options, &output)) {
648 fprintf(stderr, "Error initializing processor.\n"); 647 fprintf(stderr, "Error initializing processor.\n");
649 return 1; 648 return 1;
650 } 649 }
651 if (!ProcessEntries(&processor, kSampleSize, kSampleRequests)) 650 if (!ProcessEntries(&processor, kSampleSize, kSampleRequests))
652 return 1; 651 return 1;
653 PrintMap(&output); 652 PrintMap(&output);
654 } 653 }
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698