mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-03-10 09:26:26 +00:00
Breakpad processor: Make PostfixEvaluator treat the MemoryRegion as const.
In order to be able to treat any MemoryRegion as const, the accessor functions need to be declared this-const, which means annotations on all the subclasses, etc. etc. Since MinidumpMemoryRegion fills its memory_ member on demand, that member needs to be marked 'mutable', but this is exactly the sort of situation the 'mutable' keyword was intended for, so that seems all right. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@509 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2006, Google Inc.
|
||||
// Copyright (c) 2010, Google Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
@@ -90,7 +90,7 @@ class PostfixEvaluator {
|
||||
// (^) will not be supported. |dictionary| may be NULL, but evaluation
|
||||
// will fail in that case unless set_dictionary is used before calling
|
||||
// Evaluate.
|
||||
PostfixEvaluator(DictionaryType *dictionary, MemoryRegion *memory)
|
||||
PostfixEvaluator(DictionaryType *dictionary, const MemoryRegion *memory)
|
||||
: dictionary_(dictionary), memory_(memory), stack_() {}
|
||||
|
||||
// Evaluate the expression. The results of execution will be stored
|
||||
@@ -144,7 +144,7 @@ class PostfixEvaluator {
|
||||
|
||||
// If non-NULL, the MemoryRegion used for dereference (^) operations.
|
||||
// If NULL, dereferencing is unsupported and will fail. Weak pointer.
|
||||
MemoryRegion *memory_;
|
||||
const MemoryRegion *memory_;
|
||||
|
||||
// The stack contains state information as execution progresses. Values
|
||||
// are pushed on to it as the expression string is read and as operations
|
||||
|
||||
Reference in New Issue
Block a user