Merge lp:~zorba-coders/zorba/bug-988417-block-internal-module into lp:zorba
Proposed by
Till Westmann
Status: | Superseded | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~zorba-coders/zorba/bug-988417-block-internal-module | ||||
Merge into: | lp:zorba | ||||
Diff against target: |
159 lines (+94/-5) 4 files modified
src/compiler/translator/translator.cpp (+5/-0) src/context/static_context.cpp (+15/-0) src/context/static_context.h (+9/-0) test/api/userdefined_uri_resolution.cpp (+65/-5) |
||||
To merge this branch: | bzr merge lp:~zorba-coders/zorba/bug-988417-block-internal-module | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chris Hillery | Approve | ||
Matthias Brantner | Pending | ||
Markos Zaharioudakis | Pending | ||
Review via email: mp+103542@code.launchpad.net |
This proposal has been superseded by a proposal from 2012-05-01.
Description of the change
Enables a user to disable an built-in module. This is done by adding a collection of blocked modules URIs to the static context. This collection is checked before a built-in module is added to the context in the translator.
To post a comment you must log in.
1. To maintain ABI compatibility, you must only add new virtual functions to the end of public classes.
2. I don't like that this mechanism is so different to the way you block non-internal modules (using a URIMapper with DENY_ACCESS). While it would be a bit less efficient, it would be more consistent to call static_ context: :resolve_ uri() at translator.cpp line 2840 solely for the purpose of seeing if zerr::ZXQP0029_ URI_ACCESS_ DENIED is thrown.