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

Side by Side Diff: src/handles.h

Issue 7977001: Added ability to lock strings to prevent their representation or encoding from changing. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More tweaks. Created 9 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 | « src/api.cc ('k') | src/handles.cc » ('j') | src/heap.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 NoHandleAllocation() {} 373 NoHandleAllocation() {}
374 ~NoHandleAllocation() {} 374 ~NoHandleAllocation() {}
375 #else 375 #else
376 inline NoHandleAllocation(); 376 inline NoHandleAllocation();
377 inline ~NoHandleAllocation(); 377 inline ~NoHandleAllocation();
378 private: 378 private:
379 int level_; 379 int level_;
380 #endif 380 #endif
381 }; 381 };
382 382
383
384 void LockString(Handle<String> string);
385
386 // Scoped lock on a string.
387 class StringLock {
388 public:
389 explicit StringLock(Handle<String> string);
390 ~StringLock();
391 private:
392 Handle<String> string_;
393 };
394
383 } } // namespace v8::internal 395 } } // namespace v8::internal
384 396
385 #endif // V8_HANDLES_H_ 397 #endif // V8_HANDLES_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/handles.cc » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698